MySQL error, what's wrong here..

From: Date: Mon, 23 Jul 2001 22:57:23 +0000
Subject: MySQL error, what's wrong here..
Groups: php.general 
Request: Send a blank email to php-general+get-59269@lists.php.net to get a copy of this message
<?php $id = rand(1,2); $query = "SELECT songname FROM mp3 WHERE sgid = " .$id; $result = mysql_query($query,$connection); $mp3d = mysql_fetch_array($result); ?> the server is telling me line 43(which starts with $mp3d) is not a valid mysql result resource. what am i doing wrong?? chris

« previous php.general (#59269) next »