我有一个带有“AllParties”表的 MySQL 数据库。当我使用 PHP(如下)将数据插入到该表中时,我没有收到错误,但是,数据没有插入到表中。我尝试从 MySQL 服务器获取错误报告,但很模糊,它说 MySQL 语法有错误。请注意我在 Mac CodeRunner 中运行我的代码,这可能是问题所在?此外,$con 是一个成功的连接。
<?php
$con=mysqli_connect("sql3.freemysqlhosting.net","*********","********","*********");
$name = "Will's Party";
$date = 'October 1st, 2013';
$housenum = '333 East Street';
$city = "Golden Gate";
$state = "California";
$time = "7:00";
$tag = "Serra";
mysqli_select_db('AllParties', $con);
$alpha = mysqli_query($con, 'INSERT INTO AllParties(Party Name, Date, House number and street name, City, State, Time, Tag) VALUES("$name","$date","$housenum","$city","$state","$time","$tag")');
?>