# |
Mar 14th 2018, 15:57 |
dereuromark |
looks like it is not complete |
# |
Mar 14th 2018, 15:40 |
alexmax |
there is no boolean type? |
# |
Mar 14th 2018, 15:40 |
alexmax |
https://book.cakephp.org/3.0/en/development/testing.html#creating-fixtures |
# |
Mar 14th 2018, 15:39 |
alexmax |
oh, found it |
# |
Mar 14th 2018, 15:38 |
alexmax |
Where can I find a list of all schema data types? |
# |
Mar 14th 2018, 15:19 |
pierre-baptiste.varle |
thank you @dereuromark |
# |
Mar 14th 2018, 15:17 |
pierre-baptiste.varle |
I will use the standard php function |
# |
Mar 14th 2018, 15:16 |
dereuromark |
you can use some own lib with your own url() method if you want to, this is not framework relevant though |
# |
Mar 14th 2018, 15:16 |
dereuromark |
it is designed for the internal building |
# |
Mar 14th 2018, 15:16 |
dereuromark |
performance issues |
# |
Mar 14th 2018, 15:15 |
pierre-baptiste.varle |
I was thinking that router can be used for external url too |
# |
Mar 14th 2018, 15:15 |
pierre-baptiste.varle |
yes I just found http://php.net/manual/fa/function.http-build-url.php thank |
# |
Mar 14th 2018, 15:13 |
dereuromark |
build_query_strings() etc manually called will do the trick for u |
# |
Mar 14th 2018, 15:13 |
dereuromark |
its mainly meant for internal URLs :slightly_smiling_face: for external you can skip it |
# |
Mar 14th 2018, 15:08 |
pierre-baptiste.varle |
@narendravaghela Router::url('http://www.google.com') return 'http://www.google.com' right? why to use this function if it's do nothing? I would like to have something like thister::url(['http://www.google.com', '?'=>['q'=>'search Query']]) |
# |
Mar 14th 2018, 14:11 |
lorenzo |
what was the generated query? |
# |
Mar 14th 2018, 13:27 |
narendravaghela |
by the way, the query returns too many results - 451 rows |
# |
Mar 14th 2018, 13:23 |
narendravaghela |
I am using ~3.2 |
# |
Mar 14th 2018, 13:22 |
lorenzo |
It is like debug() but specialized to query objects |
# |
Mar 14th 2018, 13:22 |
lorenzo |
There is also sql($query) if you are using the latest debugkit |
# |
Mar 14th 2018, 13:19 |
narendravaghela |
dumpanddie, I did't know that |
# |
Mar 14th 2018, 13:19 |
narendravaghela |
and also thanks @brettl for `dd` |
# |
Mar 14th 2018, 13:19 |
narendravaghela |
thanks :thumbsup: |
# |
Mar 14th 2018, 13:19 |
lorenzo |
Look at the generated query and fix any erros |
# |
Mar 14th 2018, 13:19 |
lorenzo |
Cool I think you can figure it out from here |
# |
Mar 14th 2018, 13:18 |
narendravaghela |
but now `Unknown column TL.id` |
# |
Mar 14th 2018, 13:18 |
lorenzo |
Haha yes @brettl just going slower with him |
# |
Mar 14th 2018, 13:17 |
lorenzo |
Remove it |
# |
Mar 14th 2018, 13:17 |
lorenzo |
Yeah, it is |
# |
Mar 14th 2018, 13:17 |
narendravaghela |
I think I need to remove newExpr() |
# |
Mar 14th 2018, 13:17 |
lorenzo |
I think $q might already be newExpr() and I’m not remembering correctly |
# |
Mar 14th 2018, 13:16 |
slackebot |
'start_time' => 'string', 'TimeLogs__end_time' => 'string', 'TimeLogs.end_time' => 'string', 'end_time' => 'string', 'TimeLogs__hours' => 'integer', 'TimeLogs.hours' => 'integer', 'hours' => 'integer', 'TimeLogs__mins' => 'integer', 'TimeLogs.mins' => 'integer', 'mins' => 'integer', 'TimeLogs__description' => 'text', 'TimeLogs.description' => 'text', 'description' => 'text', 'TimeLogs__created' => 'datetime', |
# |
Mar 14th 2018, 13:16 |
slackebot |
'TimeLogs.created' => 'datetime', 'created' => 'datetime', 'TimeLogs__modified' => 'datetime', 'TimeLogs.modified' => 'datetime', 'modified' => 'datetime' ] [protected] _types => [] } } ``` |
# |
Mar 14th 2018, 13:16 |
slackebot |
'TimeLogs.project_id' => 'integer', 'project_id' => 'integer', 'TimeLogs__task_id' => 'integer', 'TimeLogs.task_id' => 'integer', 'task_id' => 'integer', 'TimeLogs__work_activity_id' => 'integer', 'TimeLogs.work_activity_id' => 'integer', 'work_activity_id' => 'integer', 'TimeLogs__date' => 'date', 'TimeLogs.date' => 'date', 'date' => 'date', 'TimeLogs__start_time' => 'string', 'TimeLogs.start_time' => 'string', |
# |
Mar 14th 2018, 13:16 |
narendravaghela |
``` object(Cake\Database\Expression\QueryExpression) { [protected] _conjunction => 'AND' [protected] _conditions => [] [protected] _typeMap => object(Cake\Database\TypeMap) { [protected] _defaults => [ 'TimeLogs__id' => 'integer', 'TimeLogs.id' => 'integer', 'id' => 'integer', 'TimeLogs__user_id' => 'integer', 'TimeLogs.user_id' => 'integer', 'user_id' => 'integer', 'TimeLogs__project_id' => 'integer', |
# |
Mar 14th 2018, 13:16 |
brettl |
hehe |
# |
Mar 14th 2018, 13:16 |
brettl |
@lorenzo |
# |
Mar 14th 2018, 13:16 |
brettl |
you still showed me that at the conference last year @lorello :slightly_smiling_face: |
# |
Mar 14th 2018, 13:16 |
narendravaghela |
``` |
# |
Mar 14th 2018, 13:16 |
brettl |
:slightly_smiling_face: |
# |
Mar 14th 2018, 13:16 |
brettl |
or dd($q) |