# |
Jul 5th 2018, 10:22 |
neon1024 |
Or you can call `->execute()` or `->all()` or `->first()` if you want to execute the query and return a ResultSet or Entity |
# |
Jul 5th 2018, 10:21 |
neon1024 |
@liaogz82 `$query->toArray();` |
# |
Jul 5th 2018, 10:21 |
neon1024 |
Or check the Awesome CakepHP list |
# |
Jul 5th 2018, 10:21 |
liaogz82 |
Guys, I crafted out a query, how do I get the array? |
# |
Jul 5th 2018, 10:21 |
slackebot4 |
!awesome |
# |
Jul 5th 2018, 10:21 |
slackebot4 |
Command sent from Slack by neon1024: |
# |
Jul 5th 2018, 10:20 |
neon1024 |
@mohitprakashsharma555 I feel that’s something you could Google for yourself |
# |
Jul 5th 2018, 10:18 |
mohitprakashsharma555 |
i want to event calendar, is there have any plugin in cakephp ? |
# |
Jul 5th 2018, 10:10 |
josbeir |
and idd, chunking is a good solution |
# |
Jul 5th 2018, 10:09 |
josbeir |
also, make sure to set cascade and callbacks to false if you are just trying to remove from 1 table, otherwise various ORM stuff will trigger and given the number of records that would indeed cause memory issues |
# |
Jul 5th 2018, 10:09 |
neon1024 |
Chunk it, I guess |
# |
Jul 5th 2018, 10:09 |
neon1024 |
Sounds like the php ini setting to me |
# |
Jul 5th 2018, 10:06 |
josbeir |
le_gremz are you passing a large array of ids or something ? |
# |
Jul 5th 2018, 09:59 |
le_gremz |
i work with cake 2.6.11 and i have some troubles with deleteAll. When i try to use to delet 1k elements, i got an error message "Allowed memory size of 1073741824 bytes exhausted (tried to allocate 523800 bytes)". I don't understand why. If i try do split in to 2 requests like using a "find" then a classic "delete" it's works. Is there anything in need to know about using DeleteAll ? Thx for your help. |
# |
Jul 5th 2018, 09:53 |
le_gremz |
hello everyone |
# |
Jul 5th 2018, 09:15 |
jm |
@steinkel thanks will do |
# |
Jul 5th 2018, 09:14 |
steinkel |
check https://github.com/FriendsOfCake/awesome-cakephp#authentication-and-authorization if that's your case |
# |
Jul 5th 2018, 09:13 |
steinkel |
@jm some people use ACL when they only require RBAC and some custom rules, like ownership and membership for their permissions |
# |
Jul 5th 2018, 09:13 |
jm |
@saeideng one last question is wise to integrate ACL plugin on an existing project of just start from the scratch? |
# |
Jul 5th 2018, 09:10 |
jm |
thanks il check it out |
# |
Jul 5th 2018, 09:09 |
saeideng |
yes |
# |
Jul 5th 2018, 09:09 |
jm |
is it now a plugin right? |
# |
Jul 5th 2018, 09:09 |
saeideng |
I dont use it :slightly_smiling_face: |
# |
Jul 5th 2018, 09:09 |
saeideng |
should be stable https://github.com/cakephp/acl/releases |
# |
Jul 5th 2018, 09:08 |
jm |
@saeideng is it stable for production? |
# |
Jul 5th 2018, 09:08 |
saeideng |
there are other options |
# |
Jul 5th 2018, 09:07 |
Martin` |
I'm happy I removed acl from our project :) |
# |
Jul 5th 2018, 09:07 |
saeideng |
`github.com/cakephp/acl` |
# |
Jul 5th 2018, 09:07 |
saeideng |
it is here `cakephp/acl` |
# |
Jul 5th 2018, 09:06 |
jm |
why ACL had been remove in version 3 ? and does cake3 be building stable ACL on 3 |
# |
Jul 5th 2018, 08:58 |
steinkel |
a better answer could be found here > https://stackoverflow.com/questions/30845997/how-to-generate-sql-function-calls-with-the-cakephp-query-builder |
# |
Jul 5th 2018, 08:45 |
liaogz82 |
ah ok ok thanks! |
# |
Jul 5th 2018, 08:44 |
steinkel |
@liaogz82 last resort is format your query this way `$t->find()->select(["time_worked" => "TIMEDIFF(DATE_FORMAT(modified, '%H:%i'), DATE_FORMAT(created, '%H:%i'))"])` but keep in mind you'll need to escape variables if any |
# |
Jul 5th 2018, 08:44 |
portilloster |
I believe I need to use some helper but I cannot find any up to date related information. |
# |
Jul 5th 2018, 08:43 |
portilloster |
Any ideas on how to save an show rich html text? |
# |
Jul 5th 2018, 08:43 |
portilloster |
Hi to all! |
# |
Jul 5th 2018, 08:40 |
tim |
It also supports times |
# |
Jul 5th 2018, 08:40 |
tim |
`dateDiff() Get the difference between two dates/times` |
# |
Jul 5th 2018, 08:37 |
liaogz82 |
no example for `TIMEDIFF(DATE_FORMAT(transactions.modified, '%H:%i'), DATE_FORMAT(transactions.created, '%H:%i')) as time_worked` |
# |
Jul 5th 2018, 08:35 |
liaogz82 |
@steinkel seems that the query builder do not have `TIMEDIFF` |
# |
Jul 5th 2018, 08:12 |
steinkel |
@liaogz82 check https://book.cakephp.org/3.0/en/orm/query-builder.html#using-sql-functions |