Forum Moderators: coopster
/*I get this error:
Error: You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'AND parent_thread = Thread.id AND in_reply_to IS NULL' at line 2*/
$query = "SELECT id, author, date, body, FROM Post
WHERE parent_thread = ". $_GET['threadID'];
$result = mysql_query($query);
if ($result == 0)
{
echo "Error: " . mysql_error();
}
/*Error: You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near 'AND parent_thread = Thread.id AND in_reply_to IS NULL' at line 2*/
$query = "SELECT Thread.*, date, author FROM Thread, Post WHERE
parent_topic =" . $_GET['topicID'] . " AND
parent_thread = Thread.id AND
in_reply_to IS NULL";
$result = mysql_query($query);
if ($result == 0)
{
echo "<b>Error: ";
echo mysql_error()."</br>";
}