Log message #4209284

# At Username Text
# Oct 17th 2019, 14:50 mrfeedback yes I am absolutely with you
# Oct 17th 2019, 14:46 hippo might not matter but it's good to be careful
# Oct 17th 2019, 14:45 francis.nadal @admad I figured it out thanks hehe
# Oct 17th 2019, 14:44 mrfeedback hmm thanks for the hint!
# Oct 17th 2019, 14:44 mrfeedback true story
# Oct 17th 2019, 14:44 hippo yeah until someone upgrades mysql
# Oct 17th 2019, 14:44 hippo or thats what id' do at least
# Oct 17th 2019, 14:44 mrfeedback i just tested it. its turned off on the server
# Oct 17th 2019, 14:44 hippo like adding in a check to see if it's disabled in bootstrap
# Oct 17th 2019, 14:43 hippo if you turn it off you need to be sure that whoever is managing servers for this knows that it needs to be turned off
# Oct 17th 2019, 14:42 mrfeedback lets say i want to select all proejcts with `producttype_id=1` and `producttype_id=2`. But if it is `producttype_id=1` I need to have in projectfilestable fullfilled two conditions `projectfile.marketingthumb>0` and `projectfile.videothumb>0` but if it is `producttype_id=2` it is only need for `projectfile.marketingthumb > 0`. any ideas how i could create such a query with cake?
# Oct 17th 2019, 14:37 mrfeedback i have to admit db is just an untouched mysql 5.7 docker container
# Oct 17th 2019, 14:37 mrfeedback hmm so you think i should turn it off?
# Oct 17th 2019, 14:31 francis.nadal @admad sorry, where should I put the dd(func_get_args())?
# Oct 17th 2019, 14:28 ricksaccous geez
# Oct 17th 2019, 14:28 ricksaccous that thing slows down queries a lot
# Oct 17th 2019, 14:28 ricksaccous lmao
# Oct 17th 2019, 14:27 neon1024 Guess we’re sticking with MySQL 5.7 then :,)
# Oct 17th 2019, 14:26 graziel iirc they said they will disable that switch as some point so it will come back
# Oct 17th 2019, 14:25 neon1024 I must admit, I tend to turn it off myself
# Oct 17th 2019, 14:24 neon1024 I think it’s because this is incompatible with sql_mode=only_full_group_by
# Oct 17th 2019, 14:14 slackebot1 tables like `marketinginfos`
# Oct 17th 2019, 14:14 mrfeedback any idea why `$query->distinct(['Projects.id']);` `$query->group('Projects.id');` does not work? I get `PDOException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #33 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'vvv_test.Marketinginfos.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by` as I am also joining other
# Oct 17th 2019, 14:12 ricksaccous i did something similar in a subquery join
# Oct 17th 2019, 14:11 ckjksl but would that take a while?
# Oct 17th 2019, 14:11 ckjksl I could get unique ids from all the items first and then foreach id, search for their latest entry
# Oct 17th 2019, 14:11 ckjksl Yes, that would work if i was looking for a particular item. But I'm trying to get all the latest entry of all the items (from a certain date)
# Oct 17th 2019, 14:10 ricksaccous order->(['destinations.validfrom' => 'desc']);
# Oct 17th 2019, 14:10 ricksaccous ->limit(1);
# Oct 17th 2019, 14:09 ckjksl I need the last entry from today, not all the entries from today
# Oct 17th 2019, 14:09 ricksaccous what's the problem here
# Oct 17th 2019, 14:09 ricksaccous so wouldn't that make sense
# Oct 17th 2019, 14:09 ricksaccous you are getting anything less than today it seems
# Oct 17th 2019, 14:08 ckjksl this is cool and all, but I think this experession actually gets me both the Feb 2019 entry and the May 2019 entry
# Oct 17th 2019, 14:08 ckjksl right now I have: `->andWhere(function($exp) use($validdate) { $exp->lte('destinations.validfrom', $validdate);return $exp;})`
# Oct 17th 2019, 14:07 ckjksl I have multiple entries for the same item, but each of the entries have a valid date. Example: if i search with a date of Feb 2019, I will only find things valid from Feb 2019. If there is a change in May 2019 and I search today, I should get the latest version, which is the May 2019.
# Oct 17th 2019, 14:06 ricksaccous use date time objects in the ORM
# Oct 17th 2019, 14:05 ckjksl I've got a question about ORM and searching with dates
# Oct 17th 2019, 14:04 mehov Okay, `$this->request->getSession()->read('Auth.User')` - but won't `request` get deprecated and replaced with `getRequest()` in 4.x?
# Oct 17th 2019, 14:00 alexdd55976 it does... working with at this moment
# Oct 17th 2019, 14:00 slackebot1 `Undefined variable: APP_user`, and this feels workaround-ish too What is the common accepted practice for this that'll work with 4.x? I don't need the complete answer, just link to the docs would be great