Re: [PHP-DB] select from two tables

2002-08-03 Thread Caleb Walker
#x27;Barry Rumsey' > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP-DB] select from two tables > > Well, I'm just a beginner myself, but I would say that: > > echo" by "; echo ($albumby[xoops_artist.artist]); echo""; > > should at least be: > &

Re: [PHP-DB] select from two tables

2002-07-29 Thread JJ Harrison
I would try replacing: echo" by "; echo ($albumby[xoops_artist.artist]); echo""; with this: echo" by "; echo $albumby[artist]; echo""; or even better this(notice the dots instead of different echos and the single qoutes): echo' by '.$albumby[artist].''; I would say that you have a coloumn cal

Re: [PHP-DB] select from two tables

2002-07-27 Thread Cornelia Boenigk
Hi Barry > $query = "SELECT * FROM xoops_album,xoops_artist WHERE > xoops_album.artist_id = xoops_artist.artist_id"; If you only need two fields, it is not necessary to retrieve all fields $query = "SELECT xoops_album.album, xoops_artist.artist FROM xoops_album, xoops_artist WHERE xoops_album.

RE: [PHP-DB] select from two tables

2002-07-27 Thread Barry Rumsey
Ok I tired this but it did not help, but thank you. -Original Message- From: Herman Verkade [mailto:[EMAIL PROTECTED]] Sent: Sunday, 28 July 2002 1:18 a.m. To: 'Barry Rumsey' Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] select from two tables Well, I'm just a beginne

RE: [PHP-DB] select from two tables

2002-07-27 Thread Herman Verkade
Well, I'm just a beginner myself, but I would say that: > echo" by "; echo ($albumby[xoops_artist.artist]); echo""; should at least be: > echo" by "; echo ($album[xoops_artist.artist]); echo""; or even: > echo" by "; echo ($album[artist]); echo""; Hope this helps, Herman -- PHP Database

[PHP-DB] select from two tables

2002-07-27 Thread Barry Rumsey
I have the following code: $query = "SELECT * FROM xoops_album,xoops_artist WHERE xoops_album.artist_id = xoops_artist.artist_id"; $albumby = mysql_query($query) or die("Select Failed!"); echo""; if (mysql_num_rows($albumr)) { while ($album = mysql_fetch_array($albumr)) { echo ($album