Jump to content

MySQL query


wwfc_barmy_army

Recommended Posts

Hello.

I have this in my php code:
[code=php:0]
      <?php
if ($artist == ""){
print "Please select an artist:<br/>";
$result = @mysql_query("SELECT * FROM artist");
$row = mysql_fetch_array($result);
print "<a href=index.php?artist=$row[artist_id]>$row[name]</a>";
}
?>
[/code]

I want to return all the rows in the table artist but it's only returning the first one. How can i make it return all?

Thanks
Link to comment
https://forums.phpfreaks.com/topic/26261-mysql-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.