# |
May 25th 2016, 16:40 |
hmic |
wow, took longer than expected... |
# |
May 25th 2016, 16:38 |
ionas |
hmic: finally at my place |
# |
May 25th 2016, 16:33 |
ypnos |
$this->connection()->newQuery()->select(1); this works |
# |
May 25th 2016, 16:32 |
ypnos |
Uncaught Error: Call to a member function sql() on string in /srv/http/LIMS/app/vendor/cakephp/cakephp/src/Database/QueryCompiler.php:274 |
# |
May 25th 2016, 16:31 |
ypnos |
no it doesn't it gives a "can't do stuff on string" error |
# |
May 25th 2016, 16:29 |
nemmons |
@ypnos i think ->union("SELECT 1") should work? |
# |
May 25th 2016, 16:26 |
ypnos |
how to do that.. basically having ->union(â?¦) where â?¦ is a Query object that only contains "SELECT 1" |
# |
May 25th 2016, 16:25 |
ypnos |
I want to add UNION (SELECT 1) to a query |
# |
May 25th 2016, 15:15 |
phpcoder |
why the conditions of a table i used on through option of an association of another table i not used |
# |
May 25th 2016, 14:28 |
hmic |
?! |
# |
May 25th 2016, 14:28 |
flangofas |
thanks guys :) |
# |
May 25th 2016, 14:27 |
flangofas |
hmic: next time, i will stick the reason too :) |
# |
May 25th 2016, 14:27 |
hmic |
i certainly think cake should implement a default file type to overcome theese problems, they happen often, to many ppl |
# |
May 25th 2016, 14:26 |
admad |
that always is :slightly_smiling_face: |
# |
May 25th 2016, 14:26 |
hmic |
i did read that, but supposed he knows how it works. |
# |
May 25th 2016, 14:26 |
hmic |
so still, "why" was the right thing to ask... ;) |
# |
May 25th 2016, 14:25 |
admad |
"move the uploading logic" |
# |
May 25th 2016, 14:25 |
hmic |
but probably you are right, thats the origin of his questions |
# |
May 25th 2016, 14:25 |
hmic |
he did not ask about that, but about event and request stuff |
# |
May 25th 2016, 14:25 |
admad |
that's why referring to upload plugin is better |
# |
May 25th 2016, 14:24 |
admad |
right, so without custom type he will keep head banging why he doesn't see the file data in event :slightly_smiling_face: |
# |
May 25th 2016, 14:23 |
hmic |
admad true. but you dont use events on that, but a custom Type |
# |
May 25th 2016, 14:22 |
admad |
hmic: one imp. thing to remember in case of file uploading is ensuring that marshalling doesnt wipe out the file info, "blame" won't show that |
# |
May 25th 2016, 14:22 |
a.barclay |
@admad Can you help me with my issue? I originally reported it to GitHub as a bug but devs said it was not, however I've had no luck trying to resolve what the actual problem is. |
# |
May 25th 2016, 14:21 |
hmic |
this is the cleanroom implementation i think, it does not get easier/clearer |
# |
May 25th 2016, 14:21 |
hmic |
i'd rather point him to ceeram/blame |
# |
May 25th 2016, 14:21 |
flangofas |
i setup an event in afterSave but i guess that is not the right place. |
# |
May 25th 2016, 14:19 |
admad |
checkout how the cakephp-upload plugin does it |
# |
May 25th 2016, 14:19 |
hmic |
you can setup an event accordingly and provide any data you like |
# |
May 25th 2016, 14:16 |
flangofas |
currently, i use a trait in a AppController but i prefer to handle this in the afterSave and keep my controller thin. |
# |
May 25th 2016, 14:15 |
flangofas |
hmic: I wanted to move the uploading logic in the events. |
# |
May 25th 2016, 14:11 |
hmic |
!tell flangofas about why |
# |
May 25th 2016, 14:10 |
flangofas |
thanks admad. |
# |
May 25th 2016, 14:09 |
admad |
models don't know anything about request, so no |
# |
May 25th 2016, 14:08 |
flangofas |
Hi, is there any way to get the whole request data that was posted in afterSave callback? |
# |
May 25th 2016, 14:04 |
ankr |
Have a good fest everyone. Hope to be there next year. Guess we'll hear from some of you in here. |
# |
May 25th 2016, 13:56 |
hmic |
admad: i'll bring the map with me to show around ;-) |
# |
May 25th 2016, 13:51 |
nemmons |
if it's a query object, i think you might be able to do $query->where(null, null, true) to overwrite any previously set conditions on the query object. This is just a guess, though, based on a quick reading of the where() method (http://api.cakephp.org/3.2/source-class-Cake.Database.Query.html#692-813) |
# |
May 25th 2016, 13:51 |
a.barclay |
I'm having real issues with Paginator throwing a "PDOException" and I can't see where I'm going wrong. Am using a somewhat complex relationship with a custom finder but it works for the rest of the app, just not when I use it with Paginator. Can anyone help? |
# |
May 25th 2016, 13:48 |
binary |
. |
# |
May 25th 2016, 13:45 |
binary |
Please, is it possible to have two login module (tables). Say Users (for school administrators) and students (for students). NB: I prefer not to have one users table for all of them. |