thinkphp5 chain operation comment usage

The COMMENT method is used to add comments to the generated SQL statement, www.tk-acc.com for example:

Db::table('think_score')->comment('Query the top ten scores of the exam')
->field('username,score')
->limit(10)
->order('score desc')
->select (); The
final generated SQL statement is:

SELECT username, score FROM think_score ORDER BY score desc LIMIT 10 / Query the top ten scores /

Guess you like

Origin blog.51cto.com/13959155/2542671