Page 1 of 1

mysql error is occurd while inserting data..........

Posted: Wed Feb 03, 2010 4:14 am
by manojsemwal1
hai iam using mysql 5.0 vresion and when i insert data in table its display error.
query are
insert into anntb values('','fdsaf','dsafdsfs','on','2010-02-03 15:27:39');
Out of range value adjusted for column 'announceid' at row 1

while when i insert data through querybrowser that time data is insert into table with the error but through programe its not inserting................


Thannks

Re: mysql error is occurd while inserting data..........

Posted: Wed Feb 03, 2010 6:09 am
by social_experiment
It looks like you are inserting an empty string into an integer field [sic]. Maybe check out the url i posted.

Code: Select all

<?php insert into anntb values('','fdsaf','dsafdsfs','on','2010-02-03 15:27:39'); ?>

Code: Select all

<?php
    insert into products_notifications (products_id, customers_id, date_added) values (”, ‘2?, now())
 
   /* In the above query, the error was thrown for ‘products_id’ because products_id is an integer field and the programmer was trying to      insert an empty string into it.*/
?>
 
http://webomania.wordpress.com/2006/10/ ... umn-error/

Re: mysql error is occurd while inserting data..........

Posted: Wed Feb 03, 2010 7:26 am
by manojsemwal1
yes actually that id is autoincrement value and in database so i left blank.