PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hmmm If I were in this situation I'd copy that sql out of my script and try running in against my db with phpMyAdmin or something else similar until I got the errors worked out. That way you'll be able to see mysql errors. Or insert or die(mysql_error()); Some place where I might be able to see where the error was....
$query = "SELECT t1.PhotoURL, t3.MemberNum, t3.ExtColor, t3.Descr1, t3.NumOfColor
FROM photos t1, xrefphotomember t2, memberinfo t3
WHERE t3.Featured = 'Y'
AND t2.PID = t1.PID
AND t3.MID = t2.MID
AND t1.PhotoURL = 1";
I had to add the last bit of code to select only the first photo. 'Featured' has one record, but that record has multiple photos associated with it. Duh...I told you I was a little rusty.
And thanks for that 'die' code. Works nice It told me there was no column named Y...so I changed the quotes and voila! 3X the output I wanted, lol....added that last AND...now it works like a charm