"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Small Swoole Db

Small Swoole Db

Published on 2024-11-06
Browse:334

Small Swoole Db

Small Swoole Db 2.3 introduce left joins :

$selector = (new TableSelector('user'))
    ->leftJoin('post', 'messageOwner', 'message')
;

$selector->where()
    ->firstCondition(new Condition(
        new ConditionElement(ConditionElementType::var, 'name', 'user'),
        ConditionOperator::equal,
        new ConditionElement(ConditionElementType::const, 'john')
    ))->andCondition(new Condition(
        new ConditionElement(ConditionElementType::var, 'subject', 'message'),
        ConditionOperator::like,
        new ConditionElement(ConditionElementType::const, '%hiring%')
    ))
;

packagist : https://packagist.org/packages/small/swoole-db
git : https://git.small-project.dev/lib/small-swoole-db

Release Statement This article is reproduced at: https://dev.to/sebk69/small-swoole-db-23-3e90?1 If there is any infringement, please contact [email protected] to delete it
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3