WHERE is not working. |
Hi
i have the following code below that mysql WHERE FUNCTION Is NOT WORKING whine i use OR_LIKE. but whine i try to remove all OR_LIKE it well work perfect. Code: $this->db->select('users.*,query1.*,query_price.*,'); i try different methods but im NOT luck, and im hoping that i get the answer here. Thanks in advance..
Sorry but I can't test at moment so only can give you idea..
Try replacing first like with or_like .. When you have where cause already it must be or_like.. (to be sure echo $this->db->last_query(); after the query to see what sql query is generated.. ) Best VPS Hosting : Digital Ocean
01-24-2015, 06:43 AM
(This post was last modified: 01-24-2015, 09:56 AM by ivantcholakov. Edit Reason: A typo )
@jaysondotp Are you trying this on CodeIgniter 3?
Edit: Watch the parentheses control. IMO CI2: You need to switch to raw SQL with proper escaping. CI3: You need to correct the query builder code by using group_start(), and group_end() methods (variations *_group_start() if needed). See http://www.codeigniter.com/userguide3/da...roup_start Check what SQL actually is generated and whether it is as you expected to be. Edit 2: Examples: http://www.codeigniter.com/userguide3/da...y-grouping |
Welcome Guest, Not a member yet? Register Sign In |