Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2002091

[PHP-DB] joining tables From: Barry Rumsey (basza <email protected>)
Date: 09/13/02

I have the following code :
<?
  $sql = "SELECT juke_artists.id, juke_artists.name, juke_tracks.id,
juke_tracks.ar_id, juke_tracks.name FROM juke_tracks, juke_artists WHERE
juke_tracks.ar_id = juke_artists.id and juke_tracks.name like '$lyrics%'
ORDER BY juke_tracks.name";

$lyricnames = mysql_query($sql) or die("Select Failed!");
while ($lyricname = mysql_fetch_array($lyricnames)) {
?>
<table width="100%" border="0">
  <tr>
    <td><? echo "<b><a href='lyricinfo.php?info=$lyricname
[juke_tracks.id]'>$lyricname[juke_tracks.name]</a> </b> - By $lyricname
[juke_artist.name]<br> "; ?></td>
  </tr>
</table>
<? } ?>

Being new to php & mysql I have done some reading to get the above
code, but for some reason it returns nothing. Could someone please
point out where I might have gone wrong.

Thanks in advance

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php