php fetch user data from mysql
Posted
by milodinosaur
on Stack Overflow
See other posts from Stack Overflow
or by milodinosaur
Published on 2010-06-16T14:20:52Z
Indexed on
2010/06/16
14:22 UTC
Read the original article
Hit count: 105
hi,
currently i have 2 table in mysql
structure:
messages
id | content | user_id | time
submessages
id | subcontent | msg_id | user_id | time
submessages msg_id is FK for messages id.
Now i need to query from php
$cur_user = $user->current; // current user id.
SELECT * FROM messages WHERE id > '{$_GET['id']}' // problem here
how do i query submessages that posted by others not include current user?
thank you.
© Stack Overflow or respective owner