# |
Jan 23rd 2017, 00:56 |
mdotobie |
You’re a genius. That’s exactly what it was. Now to figure out why the discrepancy in the timestamps. |
# |
Jan 23rd 2017, 00:49 |
mdotobie |
that might be exactly what it is |
# |
Jan 23rd 2017, 00:49 |
mdotobie |
let me try that. thanks for pointing me in the right direction |
# |
Jan 23rd 2017, 00:49 |
mdotobie |
that’s a good idea |
# |
Jan 23rd 2017, 00:49 |
dereuromark |
anyway, gotto go to bed, good luck |
# |
Jan 23rd 2017, 00:49 |
dereuromark |
you could try passing an actual datetime value instead to test |
# |
Jan 23rd 2017, 00:48 |
dereuromark |
could it be the NOW() and timezone issues? |
# |
Jan 23rd 2017, 00:48 |
dereuromark |
as it just askes SQL to give data back |
# |
Jan 23rd 2017, 00:47 |
dereuromark |
that doesnt make much sense to me |
# |
Jan 23rd 2017, 00:47 |
mdotobie |
just doesn’t behave correctly in Cake |
# |
Jan 23rd 2017, 00:47 |
mdotobie |
it does |
# |
Jan 23rd 2017, 00:47 |
dereuromark |
does it behave the same as your desired query? |
# |
Jan 23rd 2017, 00:47 |
mdotobie |
yep |
# |
Jan 23rd 2017, 00:47 |
dereuromark |
did you run the generated query in your sql tool? |
# |
Jan 23rd 2017, 00:46 |
mdotobie |
but CakePHP pulls it in even before the interval has elapsed |
# |
Jan 23rd 2017, 00:46 |
mdotobie |
interval_seconds is set to 300 (5min) and in Querious this line is excluded from the results as expected |
# |
Jan 23rd 2017, 00:45 |
mdotobie |
thats probably the most vital line. right now I have a test task that has a completed datetime stamp less than the time that needs to elapse in the interval_seconds field |
# |
Jan 23rd 2017, 00:44 |
mdotobie |
`'interval_seconds =' => $tasks->func()->TIMESTAMPDIFF([ 'SECOND' => 'literal' , 'completed' => 'identifier' , 'NOW()' = 'literal' ])` |
# |
Jan 23rd 2017, 00:44 |
mdotobie |
and when I run it against the DB (I use Querious) it works as expected |
# |
Jan 23rd 2017, 00:44 |
mdotobie |
yes. and the generated SQL is correct |
# |
Jan 23rd 2017, 00:44 |
dereuromark |
most likely there is an isue with your AND/OR |
# |
Jan 23rd 2017, 00:43 |
dereuromark |
I see. as to your query, did you compare the generated and the desired sql query? |
# |
Jan 23rd 2017, 00:43 |
mdotobie |
at this point I should probably continue down the path I’m on because its tightly integrated to the task. but I definitely like your plugin for some other projects I’ve got going |
# |
Jan 23rd 2017, 00:43 |
mdotobie |
only issue is this is specific to generating some XML to send to QuickBooks so the queue has to work with a SOAP service |
# |
Jan 23rd 2017, 00:42 |
mdotobie |
this actually looks good. |
# |
Jan 23rd 2017, 00:41 |
slackebot |
!tell mdotobie about awesome-cakephp |
# |
Jan 23rd 2017, 00:41 |
slackebot |
Command sent from Slack by dereuromark: |
# |
Jan 23rd 2017, 00:41 |
mdotobie |
I actually didn’t even know about it |
# |
Jan 23rd 2017, 00:41 |
dereuromark |
you didnt want to make the queue plugin better instead? ;) |
# |
Jan 23rd 2017, 00:41 |
mdotobie |
that’s actually exactly what I’m designing |
# |
Jan 23rd 2017, 00:40 |
dereuromark |
looks almost like my queue plugin code :slightly_smiling_face: |
# |
Jan 23rd 2017, 00:39 |
dereuromark |
check the generated query (debug kit) |
# |
Jan 23rd 2017, 00:39 |
mdotobie |
Hello. I have a strange situation. I am using the Query Builder to create an SQL query in CakePHP3(3.3.9) and the Cake is returning a row that shouldn’t be in the result set, but if I run the generated SQL against the database it behaves as expected |
# |
Jan 22nd 2017, 23:38 |
savant |
@bigdaddygee what are the relations between the tables? |
# |
Jan 22nd 2017, 21:03 |
bigdaddygee |
I get this SQL (I've replaced all field name by *...) SELECT * FROM alerts Alerts INNER JOIN users Users ON Users.id = (Alerts.user_id) WHERE (Users.digestType = :c0 AND AlertCategories.sub_category_id in (:c1,:c2,:c3)) |
# |
Jan 22nd 2017, 21:02 |
bigdaddygee |
Hum, i'm facing a problem and I understand why it happen, but can't figure how to fix it right now... I'm using contain to require some tables that are related to my queried one and I want to filter theses results where they meet some predefined id. I expected an inner join from the query builder to occur, but instead it create other sql request so I can't filter into it's telling me unknown column name :| |
# |
Jan 22nd 2017, 20:45 |
GutaFish |
is possible to get from tash which shell command called it ? Or. How I could disable welcome message from task? |
# |
Jan 22nd 2017, 20:39 |
bigdaddygee |
they are handled by Cake itself |
# |
Jan 22nd 2017, 20:39 |
bigdaddygee |
You should not take care of modified or created |
# |
Jan 22nd 2017, 19:57 |
siran |
... maybe .... though I doubt it, since I was doing an unset($row['modified']) before the save() |
# |
Jan 22nd 2017, 19:56 |
siran |
that can solve the issue |