select($condition, $alias = null, $only = true, $override = false)

This method create customized element alias for you SELECT ( find, get ) queries
@param String $condition
@param String $alias
@param Boolean $only ( DEPRECATED )
@param Boolean $override
@return PhpBURN_Core


The SELECT condition, for example: “COUNT(id_users)” or “name”

The alias to be outputed to the model example: “total” or “full_name”

$only (deprecated)

$override (optional)
Optional field that clean all select() used before and starts again.


Sometimes you need to use a function or even give another name for that field you mapped, well, now you can EASY EASY…

Let’s see how to use a function to COUNT the registers for example:

$user = new Users();


$totalLines = $user->find();

print $user->fetch()->total;

Note that $totalLines is different from total, in $totalLines in this case will return 1 while $user->total will return the amount of items in the table.