create table cart(cart_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
product_id int,
product_name varchar(1000),
product_price float(10,2)
);
the first statement works correctly, but in the second not!!!
mysql_query("INSERT INTO cart (product_id, product_name)
VALUES (" . $row["product_id"] . "12" . ")") or die(mysql_error());
mysql_query("INSERT INTO cart (product_id, product_name)
VALUES (" . $row["product_id"] . "Milk" . ")") or die(mysql_error());
i got "Unknown column 'Milk' in 'field list'"... any idea appreciated...