db::with PHP Method

with() static public method

An easy method to build a part of the where clause to find stuff by its first character
static public with ( string $field, string $char ) : string
$field string The name of the field
$char string The character to search for
return string Returns the where clause part
    static function with($field, $char)
    {
        return 'LOWER(SUBSTRING(' . $field . ',1,1)) = "' . db::escape($char) . '"';
    }