catfan / Medoo

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

[!empty]Instead of[isset] #74

Closed tianyiw2013 closed 6 years ago

tianyiw2013 commented 10 years ago

function where_clause($where) if (isset($where['AND']))

suggest: if (!empty($where['AND']))

My code: <?php $where = array(); $uid&& $where['uid'] = $uid; $type && $where['type'] = $type ; $list = db()->select("table", '*',array('AND'=>$where));

GaryJones commented 9 years ago

This looks to be fixed: https://github.com/catfan/Medoo/blob/master/medoo.php#L429