View Single Post
  #1 (permalink)  
Old July 20th, 2010, 10:09 AM
DMatt DMatt is offline
Authorized User
Points: 152, Level: 3
Points: 152, Level: 3 Points: 152, Level: 3 Points: 152, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2010
Location: Bra - Italy
Posts: 36
Thanks: 1
Thanked 1 Time in 1 Post
Default Chp 10: mysql command question

Hi, i've a question about mysql command in the chp 10 (and not only).

I don't understand the syntax of this:
PHP Code:
if ($character_id != 0) {
    
$query 'SELECT
        c.alias, c.real_name, c.alignment,
        l.address, z.city, z.state, z.zipcode_id
        FROM
            comic_character c, comic_lair l, comic_zipcode z
        WHERE
            z.zipcode_id = l.zipcode_id AND
            c.lair_id = l.lair_id AND
            c.character_id = ' 
$character_id;
    
$result mysql_query($query$db) or die (mysql_error($db)); 
I mean the "c." , "l." , "z." and the "comic_character c, comic_lair l, comic_zipcode z", why i have to insert c, l and z? how it works?

Thanks
Reply With Quote