Getting a specific category while using JOINed tables
Date: 09/25/06
(MySQL Communtiy) Keywords: mysql, database, sql
Hello,
I'm making a wallpaper database for my site, and I have two tables: wallpapers and wpartist. The wallpapers table holds all of the wallpaper info (obviously), while the wpartist table has the info on the artists who made the wallpapers. The two tables are JOINed by the artistid field.
Right now I'm able to show all wallpaper results, but I would like to also be able to show only a certain category, like a specific character. Is it possible to do that now that WHERE is being used by the joined tables? Here is the code I'm using now:
$result = mysql_query
("SELECT * FROM wallpapers, wpartist
WHERE wallpapers.artistid = wpartist.artistid
order by date desc");
I hope you guys can help! =)
Source: http://community.livejournal.com/mysql/104162.html