美文网首页
2020-07-21thinkphp可以这样写数据库链式操作

2020-07-21thinkphp可以这样写数据库链式操作

作者: longtianze | 来源:发表于2020-07-21 17:00 被阅读0次

thinkphp的数据库链式操作很好用,可以分次链接,如:

$client_db=db('client');

$keyword=input('keyword');

if($keyword){

    $client_db->where('name','like','%'.$keyword.'%');

}

$result=$client_db->find();

echo '<br/>'.$sql.'<br/>';

相关文章

网友评论

      本文标题:2020-07-21thinkphp可以这样写数据库链式操作

      本文链接:https://www.haomeiwen.com/subject/dnfwkktx.html