If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > mySQL Error - invalid result resource

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-19-04, 10:50
DigitHeads DigitHeads is offline
Registered User
 
Join Date: Mar 2004
Location: Daytona Beach, FL.
Posts: 1
Angry mySQL Error - invalid result resource

i cloned a piece of sql code embedded into a php file.

the original works, however the clone generates the following error:

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


code is identical:

$SQL = "SELECT * FROM ProductInfo WHERE ProductName=$DataKey ORDER BY ProductName";
$result = mysql_query($SQL, $GLOBALS[link]);
while ($AP = mysql_fetch_array($result)) {
include('productinfoformdata.php');
}

key is passed via url, retrieves ok.

what am i doing wrong ?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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