mysqli_sql_exception: 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 'order by gdate desc limit 1' at line 1 in file /home1/playcomp/public_html/teamstats/index.php on line 340 #0 /home1/playcomp/public_html/teamstats/index.php(340): mysqli_query(Object(mysqli), 'SELECT sid, gda...') #1 {main}