mysql - codeigniter joining the table twice not working -


I'm not sure what I'm missing but here's the code

  public Function Searchfiles list ($ filter, $ rpp, $ pn, $ sort_by, $ sort) {$ arr = array (); $ This- & gt; DB- & gt; Select (name 'as' flight_id,'. 'Flight_no, airline_name as the airline_name, name as destination_name', 'ori.name as the original_name, time', incorrect); $ This- & gt; Db- & gt; From ($ this- & gt; tbl_flight); $ This- & gt; Db- & gt; Join ($ this-> tbl_airline, 'airline.id = flight.airline_id', 'left'); $ This- & gt; Db- & gt; Join ($ this-> tbl_location. 'Ori', 'ori.id = flight.origin_id', in the form of 'left'); $ This- & gt; Db- & gt; Join ($ --- 'tbl_location.' As 'des', 'des.id = flight.destination_id', 'left'); $ This- & gt; Db- & gt; By order ($ sort_by, $ sort); $ Query = $ this- & gt; Db- & gt; get receive (); $ Arr = $ query- & gt; Result_are (); Return $ arr; }  

The function works fine, but above it:

  public function searchPolicyList ($ filter, $ RPP, $ pn, $ sort_by, $ Like, $ policy_no) {$ Arr = array (); $ This- & gt; Db- & gt; (', Policy.id' 'CONCAT_WS ("", is_main_id.first_name, is_main_id.middle_name, main_full_name as is_main_id.last_name), select' policy_no 'incorrect ..); $ This- & gt; Db- & gt; (; Tbl_policy $ this- & gt;); $ This- & gt; Db- & gt; Join ($ this- & gt; tbl_user. 'As_other_id', 'is_other_id.id = policy.associated_id', 'left'); $ This- & gt; Db- & gt; To join ($ this->; tbl_user as' Is_main_id, 'is_main_id.id = policy.main_id', 'leave'); $ This- & gt; Db- & gt; By order ($ sort_by, $ sort); $ Query = $ this- & gt; Db- & gt; get receive (); $ Arr = $ query- & gt; Result_are (); Return $ arr; }  

Generates a serious error: Call a member function result_array () to a non-object ...

I have checked the DB table and the field Good but I can only use the affiliate_ID and main_id field to the user

Any help would be highly appreciated


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -