DEV Community

Cover image for Small Swoole Db 2.3
sebk69
sebk69

Posted on

1

Small Swoole Db 2.3

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%')
    ))
;
Enter fullscreen mode Exit fullscreen mode

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

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay