![]() |
Error on Usermodel !! - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Error on Usermodel !! (/showthread.php?tid=44395) |
Error on Usermodel !! - El Forum - 08-13-2011 [eluser]Dileep[/eluser] EDITED : Code: $data=array( the coding working successfully because it inserting the correct data to the databse,but when i echo $this->db->display_errors();it showing the following error , A Database Error Occurred Filename: C:\wamp\www\userreg\application\models\usermodel.php Line Number: 39 and the line num 39 is echo $this->db->display_errors(); line num 38 is $this->db->insert('userreg',$data); Error on Usermodel !! - El Forum - 08-13-2011 [eluser]Rok Biderman[/eluser] You're assigning userId as a '', which gets interpreted as 0. Get rid of that line. Also make sure the field is set to autoincrement in the db Error on Usermodel !! - El Forum - 08-13-2011 [eluser]Dileep[/eluser] thank you and sorry Coccodrillo,because that problem is solved ,i forgot to set the autoincremnt , i didnt see ur post and edited ma first post ,i am sorry about that. now its working well ,but it giving some errors when we display $this->db->display_errors(); pls check ma updated question, how can i solve this issue ? Error on Usermodel !! - El Forum - 08-13-2011 [eluser]Rok Biderman[/eluser] Well, to the best of my knowledge, the display_error is available for file uploading, image manipulation and trackback classes. So, the error you're getting is from using non-existing method. Toss that line out as well. Mate, based on the last two errors, consider you might be typing just a bit quicker than thinking ![]() Error on Usermodel !! - El Forum - 08-13-2011 [eluser]Dileep[/eluser] +2 for your answer sir, i will keep it in mind and it will b applied next time. Thank you so much ,Love Codeigniter ,Love PHP !! |