Codeigniter 4 Query Builder Getting all match records from second table - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Codeigniter 4 Query Builder Getting all match records from second table (/showthread.php?tid=91423) |
Codeigniter 4 Query Builder Getting all match records from second table - shonirits - 08-07-2024 I want to improve my sql query, can you please check and let me know how i can do this within one query? right know i am using two different function but i want to do this with one query. I am getting conversation details included verifying is user blocked or not or part of this conversation or not and also getting list of all participants of conversation. right now with two different query and functions its working fine and giving me result which i need. but i want to do this with one function with one query. FIRST FUNCTION/ QUERY: PHP Code: function get_user_chat_info($chat_id, $user_id){ SECOND FUNCTION/QUERY: PHP Code: function get_all_chat_participants($where, $select=''){ RESULT: I want same result with one query without using get_all_chat_participants function and same query use in first function. |