Method: db::field
Returns a single field value from a table
Info
Syntax
db::field($table, $field, $where=null, $order=null)
Parameters
- $table (string) The table name
- $field (string) The name of the field
- $where (mixed) Either a key/value array as AND connected where clause or a simple MySQL where clause string
- $order (string) Order clause without the order keyword. ie: "added desc"
Return (mixed)
Example
$username = db::field('user', 'username', array('id' => 1));
// sample result: bastian