where($condition_start, $stringOperator, $conditon_end = null, $condition = "AND", $override = false)

This method allow your model to add various WHERE conditions before your get, search or find call.
However it uses a new way of define your conditions and keep ALL compatibility when database change.

@param String $condition_start
@param String $stringOperator
@param String/Integer $conditon_end
@param String $condition
@param Boolean $override
@return PhpBURN_Core


What will match.
Usualy a field but you can match ANYTHING

The operator of the match

What will match with $condition_start

$condition (optional)
By default $condition is equal “AND” that means you can cascade various wheres without worry about putting AND but if you and to change it just fill this OPTIONAL field.

$override (optional)
Clean others $model->where(…) seted before this and starts again.


You can use this method leting it be 100% compatible with all databases, that means if one day you boss wake up and say: Let’s migrate to Oracle because IBM uses it you will not be arrested because you try to kill him you will smile and say: Right the way 🙂


$user = new Users();



while($user->fetch()) {

BUT if you need for ANY REASON use a string instead ( may not be compatible with all databases if you use a non ASCII function or sintax ) you can do:

$user = new Users();

$user->where('users.last_name = "Smith"');


while($user->fetch()) {

And it will produce the same effect.

This method is FLUID it means that returns it’s same model ( PhpBURN_Core ) so you can use like this:

$user = new Users();


while($user->fetch()) {

So, be creative…