Jump to content


Get POST or GET value in model

post get model

  • Please log in to reply
3 replies to this topic

#1 Racing Chocobo

Racing Chocobo

    Member

  • Members
  • PipPip
  • 28 posts

Posted 06 September 2013 - 07:44 PM

Hi, anybody know how to get the POST or GET value inside customize model?

or maybe know how to insert a value into the model from the controller?

 

I'm trying to do something like this in my model

$sql = 'Select * from a where a.value < $_GET['min']';

but not pretty sure how to do that in the model

 

thank you~



#2 davidoster

davidoster

    Grocery CRUD Ninja

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

Posted 06 September 2013 - 10:18 PM

Hello.

You do this via your controller usually.

Check here a simple example.


____________________________________________________________

 

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

____________________________________________________________

 

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


#3 Racing Chocobo

Racing Chocobo

    Member

  • Members
  • PipPip
  • 28 posts

Posted 07 September 2013 - 01:38 PM

Ok Ok I know how to do that with codeigniter, just consider whether there is a directly method via grocery crud, maybe without load the model first.

Thank you very much!



#4 davidoster

davidoster

    Grocery CRUD Ninja

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

Posted 07 September 2013 - 09:55 PM

No there isn't such a thing in Grocery CRUD since it is an automatic CRUD library.


____________________________________________________________

 

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

____________________________________________________________

 

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






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users