www.webdeveloper.com
Results 1 to 2 of 2

Thread: Help With this Website

  1. #1
    Join Date
    Jan 2014
    Posts
    2

    Question Help With this Website

    Hello guys, im a bit new to website developing but i dont understand the code 100% i would love to learn alot and here

    is something i want to fix in a gaming website for a game im working on take a look im having this error:

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\site_includes\blocks.php on line 23

    Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\site_includes\blocks.php on line 24

    Its pointing to me erros on line 23 and 24 here is line 23 and 24:

    // ASC or DESC
    $lotto_wina = mysql_fetch_array( $lotto_win ); <-- Line 23
    $r8 = mysql_fetch_row( $total_sales ); <---Line 24
    $tickets = $r8[0];
    if($tickets >= '1')
    {
    $mysql = mysql_select_db( $SiteSQL["config-database_db"] , $Site_sqlcon) or die( mysql_error() );
    $lotto_win2 = mysql_query("SELECT a_name FROM t_characters WHERE a_admin = '0' AND a_enable = '1' AND a_user_code = ". $lotto_wina['a_user_index'] ." ");
    $lotto_wina3 = mysql_fetch_array( $lotto_win2 );
    $lottowinner = $lotto_wina3['a_name']; } else { $lottowinner = "No Winner"; };
    $mysql = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );
    $result_settings = mysql_query("SELECT a_customblock_on, a_customblock_title, a_custonblock_code, a_vote1, a_vote2, a_vote3, a_vote4 from t_settings WHERE a_index = 1");
    $result_settings1 = mysql_fetch_array( $result_settings );

  2. #2
    Join Date
    Jan 2014
    Posts
    8
    Hello,
    Try to check for errors , the quickest way is to add or die after mysql_query

    $result = mysql_query(...) or die(mysql_error());

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles