What is the correct method in where_in?

laravel wherein
laravel where in array
laravel eloquent join
laravel between
laravel db::query
where in codeigniter
simple select query in laravel
laravel database

i want to get data using where in condition

my code is below

SELECT `cuc_UserCardsDetail`.*, `cuc_CreditCardType`.`varValidName`
FROM (`cuc_UserCardsDetail`)
JOIN `cuc_CreditCardType` ON `cuc_CreditCardType`.`intGlCode` = 
`cuc_UserCardsDetail`.`fk_CardTypeGlCode`
WHERE `cuc_UserCardsDetail`.`intGlCode` IN ('10,29') 
AND `chrAccountType` =  'M'
ORDER BY `dtCreateDate` desc

now I have resulted with one row actually in my table there is two-row with related id

i think problem is In('10,29') but i want like ('10','29') or (10,29) how can i do in codeigitor?

i want (10,29) or ('10','29') in where in ..

In CI query builder use

$id= array('10', '20'); # or direct assing your input params
$this->db->where_in('column_name', $id);

Read Looking for Specific Data - Codeigniter.com

A Treatise concerning the Gospel-method of being Righteous: , Shall not the judge of all the earth do right 2 was Abraham's argument in the case of Sodom, and ought always to be applied in all questions, wherein God's  First, for your 4 examples, only one of them are method calls. int i = bar(j, arr); For this particular call, it heavily depends on the the context you are calling the method in. For example, if you have a simple class Test with the method inside the class you can call it like that.

Method chaining will accept array in where_in

$intGlCode = array(10, 29);
$this->db->select('`cuc_UserCardsDetail`.*, `cuc_CreditCardType`.`varValidName`');
$this->db->from('cuc_UserCardsDetail');
$this->db->join('cuc_CreditCardType','cuc_CreditCardType.intGlCode = 
cuc_UserCardsDetail.fk_CardTypeGlCode');
$this->db->where('chrAccountType','M');
$this->db->where_in('cuc_UserCardsDetail.intGlCode',$intGlCode);
$this->db->order_by('dtCreateDate','DESC');
$data = $this->db->get()->result_array();

The Catechism Resolved Into an Easie and Useful Method; Wherein , o * - - w o Hot 21sttmbtbittto Hatabettant oittetb at tist right pant of 4. i. e. Having stayed upon the earth for the space of forty days after his Resurreótion, wherein  method: [noun] a procedure or process for attaining an object: such as. a systematic procedure, technique, or mode of inquiry employed by or proper to a particular discipline or art. a systematic plan followed in presenting material for instruction. a way, technique, or process of or for doing something. a body of skills or techniques.

Your query look something like

you have to define column chrAccountType from which table, here i assume it from cuc_UserCardsDetail

$this->db->select('ud.*, cc.varValidName');
$this->db->where_in('ud.intGlCode', ['10','29']);
$this->db->where('ud.chrAccountType', 'M');
$this->db->order_by('dtCreateDate', 'desc');
$this->db->join('cuc_CreditCardType cc', 'cc.intGlCode = ud.fk_CardTypeGlCode');
$data = $this->db->get('cuc_UserCardsDetail ud')->result_array();



 print_r($data);

A dissertation on fevers and inflammatory distempers: wherein , Another, and that the most common Method of treating Fevers, may properly be Evacuations are right, heating and nervous Medicines, which are the reverfe,  Take the negative log of the concentration of hydrogen ions. In chemistry, each letter in pH has a significant meaning: p means to take the negative log of something (note that logarithms default to base 10 when a base is not specified) H represents the concentration of hydrogen ions in the solution (note that pOH is also a possible way of measuring basicity and acidity based on the

where_in() function just in the case of array of data.

$ids = array();
$this->db->where_in('id', $ids);

The American and English Railroad Cases: A Collection of All Cases , Where, in a proceeding by a railway to condemn a right of way, defendant claimed damages to the remainder of the tract not taken, it was competent for the​  Repetition is key in the direct method if students are to draw the correct conclusions. The examples that you give should be simple, unambiguous and interesting. Let’s say you want to teach the class the shapes, say circle.

Second Decennial Edition of the American Digest: A Complete Digest , (III.1907) Where, in a proceeding to condemn a right of way, it appeared that there were no buildings on the land which would be subject to jar or other injury by  The ‘Percentage Correct’ and other Performance Prediction Methods. As we can see from the above example, the ‘percentage correct’ method is a highly practical way of measuring performance, especially in a situation where we need to compare a variety of different statistical models.

proper way to generate a WHERE IN query, proper way to generate a WHERE IN query. beezeee June 2012. I'm accepting a comma seperated list of IDs within a form post and want to find all models of a  Question: "What is the proper mode of baptism?" Answer: The simplest answer to this question is found in the meaning of the word “baptize.” It comes from a Greek word which means “to submerge in water.” Therefore, baptism by sprinkling or by pouring is an oxymoron, something that is self-contradictory.

The Central Law Journal, are those wherein the colored race was alleged to have been denied the right under the second class, wherein a State has chosen to change its methods of  The Correct Way to Pray By Hannah Goodwyn CBN.com Producer. CBN.com – Prayer, simply put, is conversation with God. That in mind, shouldn’t we be doing it in a way that pleases Him? Not to get us on a good list so that He’ll do what we ask, but to really understand how to talk with Him, and share our concerns, fears, and pleas.

Comments
  • pass separate element in IN as IN ('10','29'), Also this is not and codeigniter query, its simple mysql query, if you are using codeigniter, you should use active query builder
  • but how can i do in codeignitor query? i pass in parameter like 10,29
  • You should be passing an array containing those two values to the where_in method.
  • i tried your code but in result its give me WHERE intGlCode IN ('10,29') . so only one row data found.
  • ('10,29') will not work here, try this array(10,29)