View Single Post
06-04-2012, 09:45 AM
#1
Dan is offline Dan
Dan's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 3,164
iTrader: 15 / 86%
 

Dan is an unknown quantity at this point

  Old  JOIN two queries using the 1st query results?

PHP Code:
    $db->query("SELECT * FROM `forum topics` WHERE `slug` = '{$slug}' LIMIT 1");            
    
$topic $db->fetch();

    
$db->query("SELECT * FROM `users` WHERE `id` = '{$topic['author']}' LIMIT 1");
    
$author $db->fetch(); 
Is it possible to join these two queries? The second query is using results gathered from the 1st query.