Lets say I have created 2 tables :

create table comments {contents}
userid
username
comment
datetime
user
ip
primary key
key

table users {contents}
userid
username
.... and many more.. :)

----------

if I want to get that to work togther to add comments to users would I have
something like this..

--
$user=$DB_site->query_first("SELECT *,FROM username,
                               FROM user
                               LEFT JOIN comments ON
comments.userid=user.userid
                               WHERE user.userid=$userid");
--

that above code is slapped toghther.. can anyone shed some light on this..



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to