useragent select...
Posted: Wed Jul 21, 2010 12:52 pm
I am designing a simple php script to track how many hits I get on each browser to warm up with MySql... but I am failing at the select statement. If you could tell me what is wrong I would appreciate because this should work as far as everything I have read. I just modified the MySQL query from phpMyAdmin and added WHERE name='Firefox 3.3.6' Like so:
....
Code: Select all
@mysql_select_db("testbed") or die('DATABASE SELECT ERROR - ' . mysql_error());
// See if the current browser has a count entry ...
$Q = "SELECT * FROM 'browserhits' WHERE name = '" . $BROWSER . "';";
mysql_query($Q) or die(mysql_error() . '<br>' . $Q);
$count = mysql_num_rows();
if ($count > 0) {
// UPDATE count