View Single Post
  #3 (permalink)  
Old 07-09-09, 10:35 PM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
Quote:
Originally Posted by orange View Post
hi,

i have a problem with my php inventory system. when I trying to add new data its shows
Code:
INSERT INTO `site_users` (`user_id`,`user_name`,`user_login`,`user_password `,`user_level`,`user_email`) VALUES('','fendi','fendi','test',0,'fendi@yahoo.co m')Incorrect integer value: '' for column 'user_id' at row 1
I only can add data thru SQL queries. i try to make id as null but still cannot...
If the user_id is an auto-increment field then leave it out:
Code:
INSERT INTO `site_users` (`user_name`,`user_login`,`user_password `,`user_level`,`user_email`) VALUES('fendi','fendi','test',0,'fendi@yahoo.co m')
But if it is a generic int field then make it 0"
Code:
INSERT INTO `site_users` (`user_id`,`user_name`,`user_login`,`user_password `,`user_level`,`user_email`) VALUES(0,'fendi','fendi','test',0,'fendi@yahoo.co m')
__________________
Jerry Broughton
Reply With Quote