[thelist] Errors mysql_query PHP

Rich Gray rich at f1central.net
Fri Jan 24 05:27:00 CST 2003


Hi Andrew

>Warning: mysql_query(): supplied argument is not a valid MySQL-Link
resource in c:\program files\apache group\apache\htdocs\cart\items.php on
line 42

The above would imply that you have not connected to the MySQL server - do
you have a mysql_connect() or mysql_pconnect() prior to running your script?
Rich

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Andrew Maynes
Sent: 24 January 2003 10:42
To: Thelist at Lists. Evolt. Org
Subject: [thelist] Errors mysql_query PHP


Can someone tell me why and what are the most likely reasons I have this
errors
continually created from my code?

$result = mysql_query($sql, $connect);

while($query_data = mysql_fetch_object($result)){
// how many columns do we want...3
   if($record_column <3){
//if this is the first column we need to print the table row tag
      if($record_column == 0){
         print("<tr>");
      }

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource
in
c:\program files\apache group\apache\htdocs\cart\items.php on line 42

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result
resource in c:\program files\apache group\apache\htdocs\cart\items.php on
line
56

I have tried mysql_query with other code and the same error appears?

Thank you
Andrew





More information about the thelist mailing list