# |
May 16th 2019, 07:18 |
egalles |
I have a little question about order of a query |
# |
May 16th 2019, 07:18 |
egalles |
Good morning |
# |
May 16th 2019, 07:06 |
neofutur |
thanks ! |
# |
May 16th 2019, 07:03 |
admad |
The final query run on db would also be shown in the SQL tab of debugkit |
# |
May 16th 2019, 07:03 |
admad |
->sql() not ->toSql() |
# |
May 16th 2019, 07:02 |
admad |
debug($consents) or debug($consents->toSql()) |
# |
May 16th 2019, 06:48 |
neofutur |
the final sql query |
# |
May 16th 2019, 06:48 |
neofutur |
err ow can I check that ? |
# |
May 16th 2019, 06:31 |
admad |
did you check the generated SQL? |
# |
May 16th 2019, 06:15 |
neofutur |
full query on https://pastebin.com/TMeWK3xt |
# |
May 16th 2019, 06:13 |
neofutur |
will return nothing |
# |
May 16th 2019, 06:13 |
neofutur |
} |
# |
May 16th 2019, 06:13 |
neofutur |
return $qmail |
# |
May 16th 2019, 06:13 |
neofutur |
-> where (['Prospects.email IS NOT NULL', 'Prospects.email !=' => ''] ); |
# |
May 16th 2019, 06:13 |
neofutur |
{ |
# |
May 16th 2019, 06:13 |
neofutur |
->contain(['Prospects'], function( Query $qmail ) |
# |
May 16th 2019, 06:10 |
neofutur |
ok, thanks I ll try that ! |
# |
May 16th 2019, 06:09 |
admad |
neofutur: ['Prospects.email IS NOT NULL', 'Prospects.email !=' => ''] |
# |
May 16th 2019, 06:04 |
neofutur |
but i cant find the good syntax :( |
# |
May 16th 2019, 06:03 |
neofutur |
soething like -> where (['Prospects.email'] => NOT NULL AND NOT EMPTY ); |
# |
May 16th 2019, 05:57 |
neofutur |
i need to pass a condition to the contain table , to check that a field is NOT NULL and also nt empty |
# |
May 16th 2019, 05:57 |
neofutur |
hi all, I could use some help about https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#passing-conditions-to-contain |
# |
May 15th 2019, 18:30 |
m.hoffs |
ok, next step, empty pdf |
# |
May 15th 2019, 18:28 |
m.hoffs |
couldnt get my finger behind it |
# |
May 15th 2019, 18:28 |
m.hoffs |
digging and debugging |
# |
May 15th 2019, 18:28 |
m.hoffs |
2 days |
# |
May 15th 2019, 18:27 |
ricksaccous |
;) |
# |
May 15th 2019, 18:27 |
m.hoffs |
if($this->response->getType() != 'application/pdf'){ $this->viewBuilder()->setClassName('AdminLTE.AdminLTE'); } |
# |
May 15th 2019, 18:27 |
ricksaccous |
no problem ;) |
# |
May 15th 2019, 18:26 |
m.hoffs |
big thank you! |
# |
May 15th 2019, 18:26 |
m.hoffs |
nice nice nice |
# |
May 15th 2019, 18:24 |
m.hoffs |
can do that filter on extension |
# |
May 15th 2019, 18:23 |
m.hoffs |
enough for me to dig out |
# |
May 15th 2019, 18:23 |
m.hoffs |
ok ok |
# |
May 15th 2019, 18:23 |
ricksaccous |
that's an example |
# |
May 15th 2019, 18:23 |
ricksaccous |
if ($this->getRequest()->getParam('someparam') !== in_array(['pdf', 'json']) { } |
# |
May 15th 2019, 18:22 |
ricksaccous |
yeah |
# |
May 15th 2019, 18:22 |
m.hoffs |
it is in my appcontroller |
# |
May 15th 2019, 18:22 |
ricksaccous |
you can set it based on router params with if statements |
# |
May 15th 2019, 18:22 |
m.hoffs |
hmmm |
# |
May 15th 2019, 18:22 |
ricksaccous |
not all the time |