I am trying to pull date from these 2 tables
image
artist
The query is working for the image table info but not for the artist, also it will not print out the artid from either table.
$query="SELECT image.imgid, image.title, image.artid, image.date, artist.artid, artist.fullName FROM image LEFT JOIN artist ON artist.artid = image.artid WHERE image.title LIKE 'Portrait of a Young Woman'";
$result = mysql_query($query) or die(mysql_error());
$count = count(0);
while ($r=mysql_fetch_array($result))
{
$title=$r["title"];
$imgid=$r["imgid"];
$date=$r["date"];
$artid=$r["artid"];
$fullName=$r["fullName"];
//display the row
echo $count++;
echo ". <a href='image.php?imgid=$r[imgid]'><img src=\"image/$imgid\" border=0 ></a>, <i>".$title."</i>, ".$date.", by ".$fullName."<br>";
$fullName nor $artid will print out.
I have tried using the JOIN only and get a blank page with that. I am using the LIKE 'Portrait of a Young Woman' until I get the query to work and then will modify it to get the info from a form. Also I do have the all the correct info for this particular image and artist.