Log message #4219207

# At Username Text
# Dec 17th 2019, 16:14 neon1024 Perhaps, I’ll see if `$this->Form->secure()` works for me first :thinking_face:
# Dec 17th 2019, 16:11 neon1024 Or shall I just unlock all my ajax actions, as that seems to be what Past Dave (tm) has done
# Dec 17th 2019, 16:09 neon1024 Is there a neat way to generate `_Token` for Ajax?
# Dec 17th 2019, 15:58 gianmarxgagliardi I did a similar exercise with DogsCats with the same data structure and also gave me the names of the fields
# Dec 17th 2019, 15:51 jotpe ?!?
# Dec 17th 2019, 15:51 jotpe https://book.cakephp.org/3/en/orm/retrieving-data-and-resultsets.html#finding-key-value-pairs
# Dec 17th 2019, 15:46 neon1024 :exclamation:
# Dec 17th 2019, 15:45 gianmarxgagliardi ?
# Dec 17th 2019, 15:40 neon1024 As it doesn’t seem that I can, but worth a check. Different View template scope right?
# Dec 17th 2019, 15:40 neon1024 Can I append to the script block from inside a Cell template?
# Dec 17th 2019, 15:38 gianmarxgagliardi :-(ù
# Dec 17th 2019, 15:37 neon1024 Haha, I bet it isn’t ;)
# Dec 17th 2019, 15:36 dereuromark is that find(list)? set up a displayName as documented
# Dec 17th 2019, 15:34 gianmarxgagliardi how could I take the name from the trainers table or clubs since I have the id?
# Dec 17th 2019, 15:33 neon1024 Isn’t it Sqlite by default and MySQL by configuration?
# Dec 17th 2019, 15:33 dereuromark i dont think so
# Dec 17th 2019, 15:23 kaliel hi everyone, is that the desirable behavior for debugkit in cake 4 to store panels and requests in sql instead of sqlite ?
# Dec 17th 2019, 15:11 gianmarxgagliardi I have three tables with this structure: https://pastebin.com/e2PwW5bs when I go to work on the seasons_trainers table by adding an ennuple using the special "add" function developed in SeasonsTrainersController it shows me only ID of "trainer" or "club", but I would like to show the name
# Dec 17th 2019, 15:06 luke under the contain
# Dec 17th 2019, 15:06 luke should be able to put it in the select statement
# Dec 17th 2019, 15:06 jotpe I'll try with distinct now
# Dec 17th 2019, 15:06 luke no problem
# Dec 17th 2019, 15:06 jotpe Nevertheless thanks :)
# Dec 17th 2019, 15:05 jotpe Yeah, that's what I'm trying now ;)
# Dec 17th 2019, 15:05 luke I sometimes find with more complex queries, writing it in sql first, and getting it to work, then pushing it into query builder
# Dec 17th 2019, 15:03 luke or change to an outer join
# Dec 17th 2019, 15:02 luke try select distinct maybe?
# Dec 17th 2019, 15:02 jotpe Yes, and if I remove the group by I have duplicate membersips. I want them just once.
# Dec 17th 2019, 15:01 gianmarxgagliardi sorry someone could help me with my problem
# Dec 17th 2019, 15:00 luke if there are more than one, the response object will have all associated records attached which match the conditions
# Dec 17th 2019, 15:00 luke I dont think group by is what you are looking for then
# Dec 17th 2019, 14:57 jotpe so no aggergation
# Dec 17th 2019, 14:56 jotpe • have a student flag • are active (have no Terminations or Termination.effective is in future) • have not a valid Matriculation (no Matriculation at all or a Matriculation.revocation_date in past)
# Dec 17th 2019, 14:51 jotpe In fact all Memberships that:
# Dec 17th 2019, 14:51 jotpe I need the group by to select only the Memberships.
# Dec 17th 2019, 14:50 jotpe @luke https://gist.github.com/julianpollmann/c128d4f03211b7f423d4cae2c9f4cee1
# Dec 17th 2019, 14:46 luke you are returning too many columns in your select. But I am not sure which you are aggregating, so do you need to even group at all?
# Dec 17th 2019, 14:46 luke it should be something like this: ```mysql> SELECT a, SUM(b) FROM mytable WHERE a = 'abc'; +------+--------+ | a | SUM(b) | +------+--------+ | abc | 3000 | +------+--------+``` you can have a group by column (a) and an aggregate column (sum(b))
# Dec 17th 2019, 14:44 jotpe mom
# Dec 17th 2019, 14:44 luke @jotpe list the columns you expect to get back, and the aggregated column
# Dec 17th 2019, 14:43 jotpe I left out the Users => Names to test, the query for the Matriculations doesn't work standalone