Don't use a join in this case as it does not give any advantage and instead it will slow down the queries. Rather do two separate queries:
mysql_query('SELECT *
FROM threads AS t
WHERE t.t_id = '.mysql_escape_strings($_GET['t_id']));
And:
mysql_query('SELECT *
FROM replies AS r
WHERE r.t_id = '.mysql_escape_strings($_GET['t_id']));
This will be much faster.
shamittomar
2010-09-07 14:57:57