php fetch user data from mysql
- by milodinosaur
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.