Current location: Hot Scripts Forums » Programming Languages » PHP » mysql_fetch_array(): supplied argument is not a valid MySQL result resource...


mysql_fetch_array(): supplied argument is not a valid MySQL result resource...

Reply
  #1 (permalink)  
Old 07-15-04, 03:13 PM
Dion's Avatar
Dion Dion is offline
Newbie Coder
 
Join Date: Jun 2004
Location: NL
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Question mysql_fetch_array(): supplied argument is not a valid MySQL result resource...

Hi, I hope some1 here can help me with this problem:
PHP Code:

18$selected mysql_select_db($base,$dbh
19    or die("database error");
21   $resultmysql_query("SELECT naam,pass FROM $basesites WHERE naam='$name'");
22    $dbarray mysql_fetch_array($result);
23    print $dbarray['naam'];
24    $dbarray['pass']  = stripslashes($dbarray['pass']);
25    $pass stripslashes($pass);
26    $dbpass $dbarray['pass'];
27    /* Validate that password is correct */
28    if($pass == $dbpass){ 
everything looks fine by me but when I try to execute the php-script I get this message:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in\login.php on line 22

does any1 sees the mistake I haven't seen yet
Reply With Quote
  #2 (permalink)  
Old 07-15-04, 09:57 PM
nekeno12 nekeno12 is offline
Wannabe Coder
 
Join Date: May 2004
Location: CO
Posts: 214
Thanks: 0
Thanked 0 Times in 0 Posts
try

$dbarray = mysql_fetch_assoc($result);

Instead
Reply With Quote
  #3 (permalink)  
Old 07-16-04, 12:21 AM
mikaelf mikaelf is offline
Wannabe Coder
 
Join Date: Jun 2004
Location: php[dot]net
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
your query is invalid. try the query in mysql console and find if you notice the same error.
Reply With Quote
  #4 (permalink)  
Old 07-16-04, 03:48 AM
Dion's Avatar
Dion Dion is offline
Newbie Coder
 
Join Date: Jun 2004
Location: NL
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you both

still don't know what it was, but it is working again
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Supplied argument is not a valid MySQL result resource help aequo PHP 2 06-15-04 08:13 AM
why isnt this a valid mysql result resource mlbpa2 PHP 1 03-14-04 02:00 PM
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result ... hukka PHP 1 01-12-04 12:16 AM
wwwboard style board with modern functionality? complexprocess General HotScripts Site Discussion 11 09-03-03 03:15 AM
creating calculated fields in mysql resource after query Abu Mami PHP 0 07-31-03 06:47 AM


All times are GMT -5. The time now is 05:12 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.