![]() |
wrong data from model - 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: wrong data from model (/showthread.php?tid=48238) |
wrong data from model - El Forum - 01-09-2012 [eluser]Todlerone[/eluser] Hello all and TY in advance for any help/suggestions. I have used multiple table joins before but this one eludes me as to why it doesn't work. Here is a sample of two database queries from below. array(2) { [0]=> array(13) { ["plan_status_id"]=>"576" ["plan_status_current"]=>"arc" ["plans_plan_name"]=>"plan1" ["treat_id"]=>"582" ["clinic_visit_id"]=>"426" ["treat_num"]=>"1" ["treat_region"]=>"Lung" ["treat_location"]=>"Middle" ["treat_loc_sagittal"]=>"Rt" ["treat_loc_axial"]=>NULL ["treat_loc_coronal"]=>NULL ["treat_dose"]=>"4800" ["treat_fractions"]=>"4" } [1]=> array(13) { ["plan_status_id"]=>"577" ["plan_status_current"]=>"ip" ["plans_plan_name"]=>"Plan2" ["treat_id"]=>"583" ["clinic_visit_id"]=>"426" ["treat_num"]=>"2" ["treat_region"]=>"Lung" ["treat_location"]=>"Upper" ["treat_loc_sagittal"]=>"Lt" ["treat_loc_axial"]=>NULL ["treat_loc_coronal"]=>NULL ["treat_dose"]=>"4800" ["treat_fractions"]=>"4" } } I'm trying to get the records of this person where the plan_status_current field is 'ip' only. Here is my model query Code: function auth_treatments($cv){ My results are mixed up and wrong.....Again thank-you. |