Hi,
I have a find statement which look like this:
$results = $this-GObject-find('all', array(
'conditions' = array(
'anotherfield = 1'
),
'fields' = array(''),
'order' = 'myfield ASC',
'limit'
Hello
The syntax looks fine, you should place it in your GObject model
(models/g_object.php) and wrap it in a function i.e. function
myFindQuery($variable=false) { ... }
If $variable == true etc you can include Order / Limit and if it's equal
to false you could exclude it.
Then in your
great link thanks!!!
I solved it this way:
I build an array with all my conditions
$this-SearchConditions['conditions'][] = 'GObject.OBJ_INTERNET_UPLOAD
= DATE_SUB(NOW(),INTERVAL 14 DAY)';
$this-SearchConditions['order'] = 'GObject.OBJ_INTERNET_UPLOAD ASC';
$this-SearchConditions['limit'] = '2';