# |
May 2nd 2019, 08:43 |
conehead |
Haha. I might join one day |
# |
May 2nd 2019, 08:42 |
neon1024 |
Will be an exciting moment when CakePHP breaks 1000 contributors |
# |
May 2nd 2019, 08:41 |
neon1024 |
To build CakePHP |
# |
May 2nd 2019, 08:41 |
neon1024 |
> took an estimated 54 years of effort (COCOMO model) |
# |
May 2nd 2019, 08:05 |
neon1024 |
Morning everyone :wave: |
# |
May 2nd 2019, 06:49 |
conehead |
Still don't really get what you mean. Timestamp is just an integer value. So yes, mysql and cakephp should not care at all |
# |
May 2nd 2019, 06:49 |
COOurb |
aha, it works, thanks |
# |
May 2nd 2019, 06:48 |
COOurb |
does* |
# |
May 2nd 2019, 06:48 |
COOurb |
dow it works with mysql+cakephp stuff? |
# |
May 2nd 2019, 06:47 |
conehead |
dont really get what you want. Why can't you just use php `time()` method? |
# |
May 2nd 2019, 06:40 |
COOurb |
and that sucks |
# |
May 2nd 2019, 06:40 |
COOurb |
I can't iuse behavior without enity |
# |
May 2nd 2019, 06:35 |
COOurb |
how t oset current timestamp in query builder? set(['updated'=>???]) |
# |
May 2nd 2019, 05:39 |
ra7bi |
@dakota @conehead Thanks , at the end i must have two query and combine them to select list |
# |
May 2nd 2019, 05:32 |
slackebot |
``` |
# |
May 2nd 2019, 05:32 |
conehead |
@ra7bi Never tried, but there seems to be a `toList()` method as well. https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#using-finders-to-load-data ``` / Calling all() will execute the query // and return the result set. $results = $query->all(); // Once we have a result set we can get all the rows $data = $results->toList(); // Converting the query to a key-value array will also execute it. $data = $query->toArray(); |
# |
May 2nd 2019, 04:35 |
dakota |
@ra7bi |
# |
May 2nd 2019, 04:35 |
dakota |
The collection class's combine method does just that (that's actually what find('list') uses internally) |
# |
May 2nd 2019, 04:11 |
ra7bi |
i've two table linked associated to each , and each table hasMany data from `x` table , i want to create a list of `x` table belong for both table |
# |
May 2nd 2019, 04:08 |
ra7bi |
i mean the result of find all i need to modify it and then convert it to list |
# |
May 2nd 2019, 04:07 |
ra7bi |
is there a function in cakephp 3.x to convert `find('all') ` results into `find('list')` |
# |
May 1st 2019, 20:25 |
ricksaccous |
interesting |
# |
May 1st 2019, 20:25 |
ricksaccous |
actually you can't bind field aliases |
# |
May 1st 2019, 19:34 |
ricksaccous |
and does bind mean I have to write raw SQL? |
# |
May 1st 2019, 19:34 |
ricksaccous |
do i absolutely have to bind() to be safe? |
# |
May 1st 2019, 19:34 |
ricksaccous |
if i need userdata in the column name |
# |
May 1st 2019, 18:33 |
maymeow |
@noel @neon1024 Thanks. I created one project some time ago and split functionality to plugins and it was mess i think. So for now i have 3 plugins for authentication, settings and utils |
# |
May 1st 2019, 15:46 |
neothermic |
I've gotten better at type-hinting for PHPStorm :) |
# |
May 1st 2019, 15:46 |
neon1024 |
@admad Hey, at least I’ll be safe when the Zombies come! |
# |
May 1st 2019, 15:46 |
neon1024 |
Lucky you’re in Cake 2 then! |
# |
May 1st 2019, 15:46 |
neothermic |
I do enjoy typehinting things that PHPStorm is unaware about, like the result of Guzzle's Promise\unwrap :) |
# |
May 1st 2019, 15:46 |
admad |
Fatal error: enough grey matter not found :P |
# |
May 1st 2019, 15:45 |
neon1024 |
Syntax error. |
# |
May 1st 2019, 15:45 |
neothermic |
`/** @var MaybeHumanInterface $neon1024 */` |
# |
May 1st 2019, 15:45 |
neon1024 |
How rude. I at least implement HumanBeingInterface and PSR8 |
# |
May 1st 2019, 15:44 |
neothermic |
`/** @var object $neon1024 */` |
# |
May 1st 2019, 15:40 |
neon1024 |
Ahh, just needed a typehint! |
# |
May 1st 2019, 15:39 |
neon1024 |
Lazy perhaps, but `$query->count()` is a thing right? As `count($query->toArray())` seem silly, and I was certain that ResultSet implemented Collection, either trait or interface |
# |
May 1st 2019, 14:44 |
mrgrimpy |
thank you |
# |
May 1st 2019, 14:44 |
mrgrimpy |
ok |
# |
May 1st 2019, 14:39 |
admad |
There isn't |