Closed ksparakis closed 8 years ago
From: http://medoo.in/api/update You should only use the two dimensional array structure for the $where parameter. The $data should just be kept as a single dimensional array:
$medoo->update(TABLE::REG, [KEY::REG_STATUS => "D", "#".KEY::REG_DATE_MODIFIED => "NOW()"], ["AND" => [KEY::REG_EMAIL => $email, KEY::REG_STATUS => "A"]]);
I ran into this issue where instead of being able to update 2 fields with 1 function call , I needed to make two separate calls. This might possibly be an issue with using a MySQL Function and adding the "#" in front , or maybe this is just not supported yet as of (0.9.8).
This is what works for me: (note: Im using enums so wherever you see TABLE::SOMETHING or KEY::SOMETHING all it is, is a string)
This didn't work for me and I believe should be added or am I doing something wrong?
Just wanted to bring this up, If I have time to look at the source code and edit it, Ill gladly share my solution.