Log message #4126035

# At Username Text
# Mar 18th 2018, 08:10 loginews merely CHAR(10)
# Mar 18th 2018, 08:08 turkles windows does odd stuff to me because php can't handle larger than INT
# Mar 18th 2018, 08:08 turkles how big is the value
# Mar 18th 2018, 08:02 loginews File uploaded https://cakesf.slack.com/files/U435V89H8/F9RLB37FD/default_selected_value.txt / https://slack-files.com/T053DPNCM-F9RLB37FD-a2c4ef1351 - $data contains the keyfield and the keyvalue from a "find list". On one server (unix), the default value contained in the field VENDID is shown. On another server (windows), the display value stays blank. Both are cakephp 3. Can anyone give me a fix ?
# Mar 18th 2018, 07:15 turkles what is it called when I want to have an index which is the combination of two fields, and is it easily possible in cake
# Mar 18th 2018, 07:11 Sigfried84 thanks
# Mar 18th 2018, 06:53 admad basic PHP, nothing cake specific
# Mar 18th 2018, 06:53 admad someMethod($optional = null, $opt2 = [], $opt3 = 'default')
# Mar 18th 2018, 06:23 Sigfried84 anybody awake?
# Mar 18th 2018, 06:20 Sigfried84 Good morning! I am creating a custom helper...how can I set optional arguments and avoid warnings in case an argument is missing?
# Mar 18th 2018, 00:48 turkles answer: ->indexBy()
# Mar 18th 2018, 00:40 turkles how to I get my result set keys to be a specific field?
# Mar 17th 2018, 20:46 richellyitalo Hello. How can i do the cake rest make most fast?
# Mar 17th 2018, 18:55 dereuromark well, if you google it, you will find a lot of references on that one, but you could look into https://stackoverflow.com/questions/27983/sql-group-by-with-an-order-by (also found via google)
# Mar 17th 2018, 18:55 joopm do you have any hint for me please
# Mar 17th 2018, 18:55 joopm haha
# Mar 17th 2018, 18:55 joopm this does not help me
# Mar 17th 2018, 18:55 dereuromark yeah that doesnt work :slightly_smiling_face:
# Mar 17th 2018, 18:54 joopm ->group(['model_id'])->order(['created'=>'DESC'])
# Mar 17th 2018, 18:54 joopm i made a query filter it with ->group(['model_id']) i also want that only the last datetime ->order(['created'=>'DESC'])
# Mar 17th 2018, 18:52 joopm my problem is a bit more complicated
# Mar 17th 2018, 18:52 Rif2007 i dont know if i will be able to help but let others see
# Mar 17th 2018, 18:51 Rif2007 what was your problem joopm
# Mar 17th 2018, 18:51 Rif2007 ahh... let me reback...
# Mar 17th 2018, 18:50 joopm make it composite in mysql and cake will make automatically the associations for you
# Mar 17th 2018, 18:49 joopm than dont use 'id' field in the table just the 2 foreing key names
# Mar 17th 2018, 18:49 joopm but if you really need using composite keys
# Mar 17th 2018, 18:49 joopm yes dont mess with 'id'
# Mar 17th 2018, 18:48 dereuromark I agree. Keep things simple. id as only primary key.
# Mar 17th 2018, 18:48 Rif2007 yes
# Mar 17th 2018, 18:48 Rif2007 Lucky me I am just 3 days old. But how to handle around the association. Yes, I have firsts, seconds as well
# Mar 17th 2018, 18:48 joopm and you want to connect them in the thirds
# Mar 17th 2018, 18:48 joopm as i suppose you have a firsts,seconds tables too
# Mar 17th 2018, 18:47 joopm if you still learn cakephp using composite keys not the best practice
# Mar 17th 2018, 18:45 joopm moment
# Mar 17th 2018, 18:45 Rif2007 and the table has 3 fields (id [PK], first_id[PK], data3)
# Mar 17th 2018, 18:43 Rif2007 sorry for the wired formating
# Mar 17th 2018, 18:43 Rif2007 public function view($id = null) { $third = $this->Thirds->get($id, [ 'contain' => ['Firsts'] ]); $this->set('third', $third); }
# Mar 17th 2018, 18:42 Rif2007 it exists alright
# Mar 17th 2018, 18:42 Rif2007 this is just a fresh bake with a table having a composit primary key
# Mar 17th 2018, 18:42 joopm did you check in the database manually if that record exist?