Jump to content


Where In clause in grocery crud

grocery crud where

  • Please log in to reply
4 replies to this topic

#1 abhishek

abhishek

    Member

  • Members
  • PipPip
  • 10 posts

Posted 03 May 2013 - 01:25 PM

I want to add multiple values in where clause.

 

------------As In Sql , we do like this------------------

SELECT column_name(s)

FROM table_name

WHERE column_name IN (value1,value2,...)

------------------------------------------------------------

How to use this in grocery crud..??



#2 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 03 May 2013 - 01:34 PM

you have the same fields in both tables.
you can type like this:
tablename.column, tablename.column2
or you can rename fields

#3 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 03 May 2013 - 02:22 PM

You can have multiple where

http://www.grocerycr...functions/where

 

$crud->where('status','active');

$crud->where('name !=', $name);

$crud->where('job =', $job);

 

or you can do this

 

$where = "name='Joe' AND status='boss' OR status='active'";
$crud->where($where);


____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#4 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 03 May 2013 - 02:28 PM

sorry I did not read the question carefully

#5 kenshicu

kenshicu

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts
  • LocationHolguĂ­n, Cuba

Posted 19 June 2013 - 07:57 PM

see  http://www.grocerycr...eigniter-to-gc/







Also tagged with one or more of these keywords: grocery crud, where

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users