This code has been bothering me, but i'm getting this error and I know it should theoretically work! Here's the error- Parse error: syntax error, unexpected '=' in /home/jeeplaw/domains/siteopoly.com/public_html/wp-content/plugins/wp_geotrack/wp_geotrack.php on line 215 Here's the code: $sql = 'SELECT *, DATE_FORMAT(access_time, \''.$gt_options['gt_dateformat'].'\') AS datestr FROM '.$table_prefix.'geotrack WHERE status < 400 ' AND uri = '".$_SERVER['HTTP_HOST']."'"; Any ideas? The basic premise is that there's a field in the db that is called uri and I'm saying that if the uri field is the same as the url on the current page, pull the record. But the query is breaking.
$sql = "SELECT *, DATE_FORMAT(access_time, '" . $gt_options['gt_dateformat'] . "') AS datestr FROM " . $table_prefix . "geotrack WHERE status < 400 AND uri = '" . $_SERVER['HTTP_HOST'] . "'";