Welcome Guest, Not a member yet? Register   Sign In
Trying to join tables to display the author of blog entry
#2

[eluser]missionsix[/eluser]
well, since i'm not an active record db guy, i'll just give you the sql used:


Code:
$SQL = "SELECT blog_entries.*, users.* FROM blog_entries
LEFT JOIN users ON (blog_entries.author_id = users.user_id) WHERE
blog_entries.id = {$blog_entry_id}";

I hope you know how to read SQl. The two tables are blog_entries & users, i think you can figure it out though.


Messages In This Thread
Trying to join tables to display the author of blog entry - by El Forum - 12-11-2008, 09:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB