[PHP] Re: php can't insert data mysql table

2012-10-01 Thread Jim Giner
On 10/1/2012 12:32 AM, Tim Dunphy wrote: Hello list, I'm trying to learn and get comfortable with HTML forms in PHP. In one example I am trying to include a file upload in one of the forms. I can connect to the database but for some reason the MySQL query string is bad. I've been over this

Re: [PHP] Re: php can't insert data mysql table

2012-10-01 Thread Tommy Pham
On Mon, Oct 1, 2012 at 6:03 AM, Jim Giner jim.gi...@albanyhandball.com wrote: In this case, I do think that your insert statement is incorrect - I could be wrong. I think the VALUES clause s/b just 'VALUE'. Also if you added MYSQLI_ERROR to your error handling you should get a very helpful

Re: [PHP] Re: php can't insert data mysql table

2012-10-01 Thread Jim Giner
On 10/1/2012 9:12 AM, Tommy Pham wrote: On Mon, Oct 1, 2012 at 6:03 AM, Jim Giner jim.gi...@albanyhandball.com wrote: In this case, I do think that your insert statement is incorrect - I could be wrong. I think the VALUES clause s/b just 'VALUE'. Also if you added MYSQLI_ERROR to your error

[PHP] Re: php can't insert data mysql table

2012-10-01 Thread Jim Giner
On 10/1/2012 12:32 AM, Tim Dunphy wrote: Hello list, I'm trying to learn and get comfortable with HTML forms in PHP. In one example I am trying to include a file upload in one of the forms. I can connect to the database but for some reason the MySQL query string is bad. I've been over this

[PHP] Re: php can't insert data mysql table

2012-10-01 Thread Jim Giner
oops - I added a an extra id field. There were only 4 in OP's DESCRIBE email. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: php can't insert data mysql table

2012-10-01 Thread Tim Dunphy
hey thanks guys adding debugging info worked. Actually it was mysqli_error() providing me with a specific error of where the problem was. Cannot insert query:Duplicate entry '0' for key 'PRIMARY' This is the data in the table mysql select * from guitarwars;

Re: [PHP] Re: php can't insert data mysql table

2012-10-01 Thread Jim Giner
On 10/1/2012 12:20 PM, Tim Dunphy wrote: hey thanks guys adding debugging info worked. Actually it was mysqli_error() providing me with a specific error of where the problem was. Cannot insert query:Duplicate entry '0' for key 'PRIMARY' This is the data in the table mysql select * from

Re: [PHP] Re: php can't insert data mysql table

2012-10-01 Thread Tim Dunphy
I think the comment about your cannot insert query was because it really did not make sense. Once truly cannot insert a query. Since you ask tho, a more approp message might be Insert query failed to execute.brError returned was . mysqli_error() . brQuery was $q As for your index issue