|
SQL - Insert values
Ok. Here is my script
$dbuser="<USERNAME>";
$dbpass="<PASSWORD>";
$dbname="phone"; //the name of the database
$chandle = mysql_connect("localhost", $dbuser, $dbpass)
or die("Connection Failure to Database");
mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found. " . $dbuser);
$query="INSERT INTO FILE (A_ID, A_PHONE, A_PRICE, A_CAT, A_IMAGE, A_NAME, A_INFO) VALUES ('A0004','Nokia','38','Accessories','image/item/A0003.gif','Nokia Phone','Information')";
mysql_db_query($dbname, $query) or die("Failed Query of " . $query);
FILE is the table that I am trying to put the data into.
Within FILE there are "A_ID, A_PHONE, A_PRICE, A_CAT, A_IMAGE, A_NAME, A_INFO" Columns, no more no less. But still every time I run this page I get the error.
What have done wrong??
Thanks in advance
|