catfan / Medoo

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

MySQL String Comparison int #781

Closed Thinklong closed 5 years ago

Thinklong commented 6 years ago
$database->update('account', [
    'email' => 'foo@bar.com',
    'age' => 25,
    'lang' => ['en', 'fr', 'jp', 'cn']
],
'user_name' => 0);

In MySQL, "'user_name' = 0 is true", but we should know that it should not be true, how to avoid this in meedo

catfan commented 5 years ago

Read documentation about WHERE condition: https://medoo.in/api/where