Weet iemand waarom de volgende code niet werkt als ik hem uitvoer in PHP maar wel als ik hem uitvoer in het SQL venster van PHPMyAdmin?
SQL:
PHP:
SQL:
code:
1
| INSERT INTO product_group (name, namegroup, code) VALUES ('hy', 'trailers', '237673') |
PHP:
code:
1
2
3
4
5
6
7
8
9
| mysql_connect("xx", "xx", "xx") or die(mysql_error()); mysql_select_db("xx") or die(mysql_error()); $sql = "INSERT INTO product_group (name, namegroup, code) VALUES ('hy', 'trailers', '237673')"; if(mysql_query($sql)){ header("Location: index.php?page=products"); } else { echo "QUERY ERROR: ".$sql; } |
[ Voor 9% gewijzigd door unglaublich op 10-06-2009 08:47 ]