Hi all,
I'm encounter a problem after uploading my scripts that contain the following:
$topic2=mysql_query("SELECT parent_id, name, author, create_t, child_id, id FROM topic as foo WHERE child_id = (select MAX(child_id) from topic WHERE realm_id = '$newarray[RealmID]' AND parent_id = foo.parent_id) AND realm_id = '$newarray[RealmID]' ORDER BY create_t DESC",$link ) or die(mysql_error());
The above query works fine on my local terminal which is running 4.1.12 but when i upload it onto the server, it prompts me:
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 'select MAX(child_id) from topic WHERE realm_id = '1' AND parent
Any help / advice will be greatly appreciated. Thank you.