MySQL Forums
Forum List  »  PHP

Database query fails
Posted by: zulfaqar haidar
Date: October 19, 2012 05:37AM

Hi
I have been using my web application written in php and MySQL as the backend. It works fine on my production server which is Linux. It also worked fine on my development machine as long as it was Windows XP with WAMP server (apache, php, mysql.
I upgraded to Windows 7 Ultimate with IIS 7.5 and php 5.3 and MySQL server 5.5.25a - MySQL Community Server.
Now my Database query fails. It somehow cannot or does not get the primary key value which is auto incrementing.
Here's the my query and the error:
INSERT INTO tablename (pk,field2,field3,field4) VALUES ('', 'value2','value3','value4')Database query failed: Incorrect integer value: '' for column 'pk' at row 1
The query shows correct values for all the fileds except primary key(pk).
Any ideas?

Options: ReplyQuote


Subject
Written By
Posted
Database query fails
October 19, 2012 05:37AM
October 19, 2012 08:29AM
October 19, 2012 10:13AM
October 19, 2012 10:18AM
October 21, 2012 04:59PM
November 03, 2012 10:58PM
October 19, 2012 09:21AM
October 19, 2012 11:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.