I can't insert a row into the table
Posted: Thu Sep 01, 2011 3:17 am
hi,
I don't understand why I can't insert a row into the table:
I don't understand why I can't insert a row into the table:
thanks$con = mysql_connect("localhost","mobileApp","mobileApp");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db('database', $con);
//I'm sure the connection is well established because I can fetch values, however I can't insert them.
mysql_query("INSERT INTO Users (FirstName, LastName, Age)
VALUES ('pinco', 'pass1', 'pass2')"); //doesn't work, row is not added