Re: mysql
| From: | Alex Vargas | Date: | Thu, 31 Jan 2002 05:59:50 +0000 |
| Subject: | Re: mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82873@lists.php.net to get a copy of this message | ||
Maybe a dumb question, but are you sure you have the fields id, songname and
artist in a table named rage in a database named rage?
The times I got that error was because a non-existent field or a
non-existent table.
Otherwise, everything looks ok.
Alex.
----- Original Message -----
From: "Mason Batley" <mason@section31.com.au>
To: <php-general@lists.php.net>
Sent: Thursday, January 31, 2002 6:48 AM
Subject: [PHP] mysql
G'day
I keep getting an error message of :Warning: Supplied argument is not a
valid MySQL result resource in /var/www/html/RageProject/StripPlayList.php
on line 100
Rows:
$link = mysql_connect("127.0.0.1", "rage", "rage");
mysql_select_db("rage");
$query = "Select id from songs
where songname = '$Song' and
artist = '$Artist'";
$result = mysql_query($query);
$rows = mysql_num_rows($result); <<< Line 100
echo "Rows: $rows";
mysql_close($link);
Can someone explain why.. I've been trying to work it out for 2 long.