global $db;
$tracks = "";
$sql = "select description from movies where movieid=".$movieid." and mp3link IS NOT NULL";
$db->query($sql);
while ($db->next_record())
{
$tracks .= "<p>" . $db->f("description") . "</p>";
}
echo $tracks;
This is a code I'm using to get all records from a database with a certain ID number. I've tried the query in phpmyadmin and it shows me all the records, however, when I use this snippet of PHP code it always drops the first record it finds.
What am I doing wrong?