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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to