06-21-2004, 05:54 PM
|
#1 |
| | Howto combine 2 tables in 1 query? | | Hi there, I'm trying to combine 2 tables like this:
I have 2 tables, postcount and user
postcount has field userid
user has field userid
user has field username
How do I combine these so I can display the username together with the postcount for each userid?
I tried to do:
[sql]
$postcountuser = $DB_site->query("
SELECT userid, user FROM postcount, user where user.username=postcount.username
order BY username");
[/sql]
But, mysql considers this ambigious.
What am I doing wrong here?
| |