http://<mydomain.ru>/index.php?id=1’and get the such error:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - 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 ’’, ’127.0.0.1’)’ at line 1 »
SQL: REPLACE INTO `modx`.`modx_active_users` (internalKey, username, lasthit, action, id, ip) values(-1, ’test_user’, ’1267636014’, ’998’, 1’, ’127.0.0.1’)
[Copy SQL to ClipBoard]
$id = intval($_GET['id'])
$itemid = isset($_REQUEST['id']) ? $_REQUEST['id'] : 'NULL' ;$lasthittime = time();$a = 998;
if($a!=1) {
$sql = "REPLACE INTO $dbase.`".$table_prefix."active_users` (internalKey, username, lasthit, action, id, ip) values(-".$_SESSION['webInternalKey'].", '".$_SESSION['webShortname']."', '".$lasthittime."', '".$a."', ".$itemid.", '$ip')";