Hi guys,
I need a little help to figure out somthing kinda simple
Ive written this join query, that joins tables togeather to get thread listings.
$sql = mysql_query("SELECT a.thread_id, a.starter_id, a.topic, a.time_created,
a.time_replied, a.reply_id, a.sticky, a.locked, a.views, a.replys,
b.active_id, c.username, c.class, c.age, c.gender, c.location, c.login_time
FROM c_threads a
LEFT JOIN c_active b ON a.starter_id = b.user_id
LEFT JOIN c_users c ON a.starter_id = c.user_id
WHERE a.forum_id = " . quote_smart($cat_id) . "
ORDER BY a.announcement DESC, a.sticky DESC, a.time_created DESC"
The value a.reply_id i need to get a username from in c_users
The relationship is a.reply_id is c.user_id, everytime.
But how can i do this?
Thanks