I have this:
#
# Table structure for table 'browser'
#
CREATE TABLE browser (
id int(11) DEFAULT '0' NOT NULL,
type varchar(150) NOT NULL,
count int(11) DEFAULT '0' NOT NULL
);
Im trying to update it with this query:
$sql = "UPDATE browser SET count = count + 1 WHERE type = $browser";
FAIL's! But thi query works:
$sql = "UPDATE browser SET count = count + 1 WHERE id = 0";
Why can't I use the first one? I realy need it to work...
#
# Table structure for table 'browser'
#
CREATE TABLE browser (
id int(11) DEFAULT '0' NOT NULL,
type varchar(150) NOT NULL,
count int(11) DEFAULT '0' NOT NULL
);
Im trying to update it with this query:
$sql = "UPDATE browser SET count = count + 1 WHERE type = $browser";
FAIL's! But thi query works:
$sql = "UPDATE browser SET count = count + 1 WHERE id = 0";
Why can't I use the first one? I realy need it to work...