⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Get POST or GET value in model



Racing Chocobo
  • profile picture
  • Member

Posted 06 September 2013 - 19: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~


davidoster
  • profile picture
  • Member

Posted 06 September 2013 - 22:18 PM

Hello.

You do this via your controller usually.

Check here a simple example.


Racing Chocobo
  • profile picture
  • Member

Posted 07 September 2013 - 13: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!


davidoster
  • profile picture
  • Member

Posted 07 September 2013 - 21:55 PM

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