[solved]Strange problem with my retrieval record function: |
[eluser]brucebat[/eluser]
WAS CAUSED BY CORRUPTED DATABASE Hi all, I am experiencing a strange problem with my view record function. Screenshot: http://i.imgur.com/tyGvE.jpg When I click the view button , it is saying no record returned however there is a record there otherwise my view would not generate that button. The only time it works is on record #3. Why work on no.3 Here is just a screenshot to prove there is data http://i.imgur.com/pBzVs.jpg I have checked the view code and it is fine, I have a feeling it is the database or my query functions: Here is the controller: Code: public function view_record() Model function: Code: public function view_record($record_id) So what do you think is wrong? Thanks
[eluser]brucebat[/eluser]
Thankyou for your time! Ok heres the view but I have a feeling it is not that because why would the 3rd record displayed on the view work and the rest don't? Code: <?php
[eluser]byde[/eluser]
would you mind to post what does var($user_records); print? just paste it at the end of your controller and post the result, this will tell us whats in your result set
[eluser]brucebat[/eluser]
Thanks it is printing all the rows in my table associated with user_id = 2. All the columns are printed too as shown below. 76 times as there are 76 records associated with that user. e.g. Quote:procedure_id => 1
[eluser]byde[/eluser]
srry for asking a lot but it is difficult when not seen all the code can you post var($returend_record); form the controler view_record() and your database query
[eluser]brucebat[/eluser]
Thanks for your help byde, I decided to wipe my database clean and reload it from backup. I think the table was corrupted or something like that but now it works as intended. Once again thanks for sticking with me, I guess you kinda inspired me to go wipe the database clean and thus solve the problem ![]() |
Welcome Guest, Not a member yet? Register Sign In |