Problem with mysql query
Hello. I have one problem. This is the code:
PHP Code:
$category = implode("', '",$_POST['category']);
$category1 = "'".$category."'";
$group = $_POST['group'];
$name = $_POST['name'];
$product = $_POST['product'];
$performance = $_POST['performance'];
$service = $_POST['service'];
$price = $_POST['price'];
mysql_query("INSERT INTO system VALUES ('', '$group', $category1, '$product', '$performance', '$service', '$name', '$price')") or die(mysql_error());
echo "Product posted successfuly";
I get this error: "Column count doesn’t match value count at row 1".
I don’t know what is the problem. When i delete $category1 in query, and post ”, it works. But, i need that variable. Please, help me. Bye.
View full post on Tycoon Talk
mySQL, Problem, Query