forked from onPHP/onphp-framework
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 1
Ru:OSQL
        stev edited this page Apr 20, 2011 
        ·
        7 revisions
      
    предназначен для отправки запросов в базу данных.
Пример выборки "id", "name" и "age" из таблицы "user":
<?php
OSQL::select()->
    get(DBField::create('id'))->
    get(DBField::create('name'))->
    get(DBField::create('age'))->
    from(User::dao()->getTable())->
    where(
        Expression::ilike(
            new DBFiled('name'),
            'Joh'
        )
    );
?><?php
?>Пример удаления записей из таблицы "table" с условием:
<?php
OSQL::delete()->
    from('table')->
    where(
        Expression::lt('id', 1000)
    );
?>