tencentyun / wafer-php-server-sdk

Wafer - 企业级微信小程序全栈方案
https://github.com/tencentyun/wafer
Other
252 stars 62 forks source link

如何使用MySQL 操作类进行模糊查询 #15

Closed hl9010 closed 6 years ago

hl9010 commented 6 years ago

请问大神,MySQL 操作类,如何使用like和通配符进行模糊查询。

jas0ncn commented 6 years ago

https://github.com/tencentyun/wafer-php-server-sdk/blob/master/API.md#mysqlselecttablename-columns---conditions---operator--and-suffix-- 参考例子中 “条件为字符串” 的情况:

use  QCloud_WeApp_SDK\Mysql\Mysql as DB;

// 条件为字符串
$rows = DB::select('tableName', ['*'], 'nickname = "Jason"');