# |
Oct 12th 2017, 16:21 |
alecilla |
File uploaded https://cakesf.slack.com/files/U70LAN9EE/F7JFCUGBH/selecci__n_001.png / https://slack-files.com/T053DPNCM-F7JFCUGBH-7a0f0e087f |
# |
Oct 12th 2017, 16:21 |
hmic |
at what part are you struggling |
# |
Oct 12th 2017, 16:20 |
rrd564 |
and this is my finder so far : https://gist.github.com/rrd108/2aedefdaf28bef2919321f8e36f98e68 |
# |
Oct 12th 2017, 16:20 |
hmic |
but you could have just continued. just wanted to say that i would be away. does not mean everybody is gone :p |
# |
Oct 12th 2017, 16:20 |
rrd564 |
this is the SQL part what I want to achieve: https://gist.github.com/rrd108/1c0f2688e5e867b5c388a2f723fe23ac |
# |
Oct 12th 2017, 16:20 |
hmic |
yes |
# |
Oct 12th 2017, 16:19 |
rrd564 |
@hmic are you back? |
# |
Oct 12th 2017, 16:13 |
inoas |
yeah I wish there was a way to inject abitrary SQL in before SELECT (for CTEs https://mariadb.com/kb/en/library/with/ ) |
# |
Oct 12th 2017, 16:13 |
happy |
->newExpr() may do it though, I'll report back! |
# |
Oct 12th 2017, 16:11 |
happy |
Thanks, @mail. epilogue wont work because it only appends raw text at the end of the query, but the IGNORE/USE statement must go before the WHERE statement |
# |
Oct 12th 2017, 16:09 |
happy |
Only official mention to use/ignore index was a few years ago, a closed github request due to lack of interest |
# |
Oct 12th 2017, 16:09 |
inoas |
(no, but maybe epilogue() helps) |
# |
Oct 12th 2017, 16:07 |
happy |
Anyone had any luck using IGNORE INDEX when selecting data from mysql in cake 3? |
# |
Oct 12th 2017, 15:53 |
inoas |
and array_mege in there |
# |
Oct 12th 2017, 15:53 |
inoas |
have $this->request = $this->request->withQueryParams take varadic like ...$params |
# |
Oct 12th 2017, 15:52 |
inoas |
or hmm |
# |
Oct 12th 2017, 15:52 |
inoas |
maybe we can add withMergedQuery to cake |
# |
Oct 12th 2017, 15:52 |
inoas |
$this->request = $req->withMergedQuery($r->query, ['catalog_type_id' => $req->param->type]); |
# |
Oct 12th 2017, 15:52 |
inoas |
$req = $this->request; |
# |
Oct 12th 2017, 15:52 |
inoas |
Considering the verbosity of the getters this is the shortest form I could come up with |
# |
Oct 12th 2017, 15:49 |
inoas |
it is a bit verbose @ immutabilty |
# |
Oct 12th 2017, 15:48 |
inoas |
thats the way redux works all the time |
# |
Oct 12th 2017, 15:44 |
neon1024 |
Seems odd to have to manually merge |
# |
Oct 12th 2017, 15:44 |
neon1024 |
This seems messy? Have I got this right? `$this->request = $this->request->withQueryParams(array_merge($this->request->getQuery(), ['catalog_type_id' => $this->request->getParam('type')]));` |
# |
Oct 12th 2017, 15:43 |
inoas |
dereuromark I will take a look if the detection works on my side @ long text |
# |
Oct 12th 2017, 15:36 |
rrd564 |
ok |
# |
Oct 12th 2017, 15:36 |
rrd564 |
Let me create the desired SQL for this |
# |
Oct 12th 2017, 15:36 |
hmic |
i'll be back in 30mins, need to get my car... |
# |
Oct 12th 2017, 15:35 |
rrd564 |
This part is a small part of the whole thing |
# |
Oct 12th 2017, 15:34 |
hmic |
or what part is not working |
# |
Oct 12th 2017, 15:34 |
hmic |
can you show the query you like to create? |
# |
Oct 12th 2017, 15:32 |
rrd564 |
This is just a part of the whole thing but if I understand how to this I will able to put together the whole |
# |
Oct 12th 2017, 15:32 |
alecilla |
@rrd I want the same |
# |
Oct 12th 2017, 15:32 |
hmic |
can be a valid php file, or serialized data ideally, sure |
# |
Oct 12th 2017, 15:32 |
rrd564 |
This is what I have now |
# |
Oct 12th 2017, 15:32 |
rrd564 |
@hmic https://gist.github.com/rrd108/2aedefdaf28bef2919321f8e36f98e68 |
# |
Oct 12th 2017, 15:32 |
hmic |
create a cache file to read instead |
# |
Oct 12th 2017, 15:31 |
neon1024 |
So Configure::read then |
# |
Oct 12th 2017, 15:31 |
hmic |
think of the potential speed impact on it! |
# |
Oct 12th 2017, 15:31 |
hmic |
neon1024: not really |
# |
Oct 12th 2017, 15:31 |
neon1024 |
How can I load some routing data from my db? I’d like to create routes for ‘types’ which I have in the DB. Seems more logical to read them from there |