I am trying to use a JOIN to connect the "user_id" from my "users" table, with my "topic_by" in my "topics" table, I searched around and set up the following code.
$sql = "SELECT topics.topic_id, topics.topic_subject, topics.topic_date, topics.topic_cat, topics.topic_by
FROM topics
INNER JOIN users ON topics.topic_by=users.user_id
WHERE topics.topic_cat = " . mysql_real_escape_string($_GET['id']) . " ORDER BY topics.topic_date DESC;";
It's not returning any errors, but when I try to call the user_name..
. $row['users.user_name'] .
There is just a blank space where the data should be, what am I doing wrong? Thanks.