Log message #4108641

# At Username Text
# Jan 12th, 15:01 jotpe maybe the mysql column is datetime
# Jan 12th, 15:01 jotpe What is the _type_ of the mysql date? You could try to find everything and debug the date. Maybe it's in another format?
# Jan 12th, 14:58 learningcake any help here?
# Jan 12th, 14:52 learningcake the database table http://prntscr.com/hzhyb9
# Jan 12th, 14:52 learningcake https://gist.github.com/charlie4biz/c6dad27f1c70208fd6b8c8f23c32e1eb
# Jan 12th, 14:52 learningcake Good day guys. Don't know why this is happening. I have in my database table column var of different dates in rows like 2018-Jan-5, 2018-Feb-5,2018-Mar-05 and so on. I tried doing a select from on columns that the date is greater than today (2018-Jan-12). It works but it kip skipping Feb and starts from Mar
# Jan 12th, 14:50 jotpe and what is the output of WWW_ROOT? You could also try PHP's __DIR__ constant
# Jan 12th, 14:49 jota What r u working for guys ?
# Jan 12th, 14:49 jota I could fix it tru bootstrap.php btw. Thk for the comments :slightly_smiling_face: - Its actually a question to kill my doubts.
# Jan 12th, 14:46 jota yes. I want that, but do it that way however its not working.
# Jan 12th, 14:45 alexdd55 @neon1024 @dereuromark to mongodb question ealrier this week: i am going with mongoDB and python seems to be the best way to solve this
# Jan 12th, 14:43 jotpe So you want a constant NEW_DIR? Or don't i get it? `define('NEW_DIR', WWW_ROOT . 'test' . DS);`
# Jan 12th, 14:42 leon @dereuromark thx. I’ll give it a try.
# Jan 12th, 14:40 jota intead of that, I would only use NEW_DIR
# Jan 12th, 14:40 jota that I should avoid to use WWW_ROOT
# Jan 12th, 14:38 jotpe hm? So what's the exact problem?
# Jan 12th, 14:36 jota For me too, the thing is, my constant "NEW_DIR" has define on it the " WWW_ROOT . DS . /newDirFolder . DS "
# Jan 12th, 14:34 jota yup.
# Jan 12th, 14:34 jotpe well, `WWW_ROOT . 'test' . DS` works for me?! :slightly_smiling_face:
# Jan 12th, 14:32 neon1024 Well in which case, any suggestions I gave you would be a guess
# Jan 12th, 14:32 neon1024 So old, it’s no longer supported in fact!
# Jan 12th, 14:32 jota ouhh sorry, I have a very old version of Cake, its 1.2
# Jan 12th, 14:32 neon1024 I must have been thinking of a different one
# Jan 12th, 14:31 neon1024 Ah no it does, https://github.com/cakephp/app/blob/master/config/paths.php#L52
# Jan 12th, 14:31 neon1024 I don’t think that one exists any more does it?
# Jan 12th, 14:31 jotpe WWW_ROOT?
# Jan 12th, 14:30 jota www_root . DS . NEWDIR . DS
# Jan 12th, 14:30 neon1024 What path are you expecting and what are you getting?
# Jan 12th, 14:30 jota Right now I get this done by replacing the constant into the boostrap.php file.
# Jan 12th, 14:29 jota thk jotpe, I've read it. I've create a new constant into path.php, but is not getting the right value. (the full path to my new dir)
# Jan 12th, 14:28 jotpe @jota have a look at the constants: https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#core-definition-constants
# Jan 12th, 14:27 jota Anyone knows how to add a document root path... I was working on the path.php file, but it does not work :(
# Jan 12th, 14:26 dereuromark leon: Query on the pivot table, or manually join to do such a combined single query. You can also look into geo plugin for resusing existing "geo query" functionality to keep things DRY.
# Jan 12th, 14:26 jota hi guys
# Jan 12th, 14:00 hmic leon: you are talking about a hasMany, not belongsToMany, do you? - as in a belongsToMany you have a pivot table which does noth have the info you are after, so your query does not work (this way). take a look at the quries generated and you will notice it's not a single query with the belongsToMany
# Jan 12th, 13:43 slackebot ]); $query->contain([‘Zips’]); the following error appears Column not found: 1054 Unknown column and#039;Zips.latitudeand#039; in and#039;field listand#039;
# Jan 12th, 13:43 leon Hello all. I habe a belongsToMany Relation (Areas belonsToMany Zips). Now i want to get the average of Zips.latitude and Zips.longitude and set it to Areas.center_latitude and Areas.center.longitude in the result set. Is there a good way to to it directly with a query? with $query->select([ ‘center_latitude’ => $query->func()->avg(‘Zips.latitude’), ‘center_longitude’ => $query->func()->avg(‘Zips.l
# Jan 12th, 13:09 obinoob admad thank you ;) I have made all sorts of stupid things even 'value' => (function() use ($proposal)) { return $proposal->delivery ?? date('mm-dd-Y') })()
# Jan 12th, 13:03 admad if you want to populate the input with a default value then use "default" option for Form->control()
# Jan 12th, 13:01 obinoob admad that would be the case after submit :) I thought about beforeRender but not entirely sure...
# Jan 12th, 13:00 admad obinoob: use beforeMarshal callback in table