View Single Post
Old 09-21-2004, 10:29 PM   #1 (permalink)
Sketch
v7n Mentor
 
Sketch's Avatar
 
Join Date: 05-06-04
Location: London, UK
Posts: 1,454
iTrader: 0 / 0%
Latest Blog:
None

Sketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web pro
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
Sketch is offline   Reply With Quote