Thinkphp5.0 的实践一

Thinkphp5.0 的实践一


tp5.0默认没有__SELF__,需要定义,

define('__SELF__',strip_tags($_SERVER['REQUEST_URI']));

tp5.0默认没有NOW_TIME,需要定义,

define('NOW_TIME',$_SERVER['REQUEST_TIME']);

 
tp5的sql使用concat函数报错:
$model = new User();
$Data = $model->where($where)->order("`sort` asc,concat(`pri_path`,'-',`id`) asc")->select();

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sort`` ASC,`concat(`pri_path``,`'-'`,``id`)` ASC' at line 1。

 


猜你喜欢

转载自www.cnblogs.com/gyfluck/p/9437386.html