catfan / Medoo

The lightweight PHP database framework to accelerate the development.
https://medoo.in
MIT License
4.84k stars 1.15k forks source link

xy[!] => xyz is not working in the way its supposed to #952

Closed Siposattila closed 3 years ago

Siposattila commented 3 years ago

Describe the bug The bug is that I cant check whether the action is dislike or not action[!] => "dislike" just simply doesn't work or idk. I even checked for errors there was none.

Information

Detail Code $rows = $db->select("notif", "*", [ "to" => $email, "action[!]" => "dislike", "action[!]" => "block" ]);

Expected output A clear and concise description of what output you expected. SELECT * FROM notif WHERE to = "email@email.com" AND action != "dislike" AND action != "block"

catfan commented 3 years ago

If you want to assign value to the same column, you can just simply combine value together with array.

"action[!]" => ["dislike", "block"]
Siposattila commented 3 years ago

Thank you! I was dumb...