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

« US pop data || Weird »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home