Error on Usermodel !! |
[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);
[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
[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 ?
[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 And next time post the whole method, this way you post half of method, you get half ot the answer.
[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 !! |
Welcome Guest, Not a member yet? Register Sign In |