Table joins... Please help :P

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!

Moderator: General Moderators

Post Reply
Jim
Forum Contributor
Posts: 238
Joined: Fri Apr 19, 2002 5:26 am
Location: Near Austin, Texas

Table joins... Please help :P

Post by Jim »

I need to create a command that does the following in one line:

$sql = select id, post_by, subject, post_body, template, UNIX_TIMESTAMP(post_date) AS postdate from ".$site."_news, ron_db order by id desc limit 20

and

$sql = select template from site_db where site_pre = '$site'

The SQL statements work fine separately... I just need a way to combine them into one. Any ideas?
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

Post Reply