Re: Inserting data into MySQL

From: Date: Sat, 15 Mar 2003 23:45:02 +0000
Subject: Re: Inserting data into MySQL
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-26401@lists.php.net to get a copy of this message
yes, or you need to use the 'INSERT INTO ([field1, field2...]) values (['val1', 'val2'...]) syntax. check the mysql insert syntax. http://www.mysql.com/doc/en/INSERT.html - john On Sat, Mar 15, 2003 at 06:37:54PM -0500, Louie Henry <louiehenry@brktel.on.ca> wrote: > Good Day All! > I have been working a php/mysql and I have ran into a small problem. I > have written an html form for inserting data, and it will not insert > it. I am able to query the data from the data. I here is some of the code, > maybe some one could point out the error. > > ______________________________________________________________________________________________________ > > > $query = "INSERT into TBLutnsUser values > ( ".$fname.", ".$lname.", ".$email.", ".$phonenum.", > ".$celnum.", > ".$address.", ".$city.", ".$prov.", > ".$postalcode.")"; > > ______________________________________________________________________________________________________ > There is one other field that is not in here, that is userIndex. and it is > the indexing/primary key, and it is auto_increment. dose it need to be > added in here too? > Thank You > >

« previous php.db (#26401) next »