关于thinkphp join()查询的问题 50
//上面这些查询都返回false$Admin=M('Admin');$Re=$Admin->join('LEFTJOINsx_adminONsx_user.UID=sx_...
//上面这些查询都返回false
$Admin = M('Admin');
$Re = $Admin -> join('LEFT JOIN sx_admin ON sx_user.UID = sx_admin.AUID') -> select();
$Re = $Admin -> join('sx_admin ON sx_user.UID = sx_admin.AUID') -> select();
$Re = $Admin -> join(array('sx_admin ON sx_user.UID = sx_admin.AUID')) -> select();
//下面这个可以
$M = M();
$r = $M->query("select * from sx_admin LEFT JOIN sx_user ON sx_admin.AUID = sx_user.UID");
var_dump($Re);exit;
上面的查询我很不理解thinkphp join()的用法,为什么原生语句可以查询到,而join()只能返回false,求THINKPHP达人指正 展开
$Admin = M('Admin');
$Re = $Admin -> join('LEFT JOIN sx_admin ON sx_user.UID = sx_admin.AUID') -> select();
$Re = $Admin -> join('sx_admin ON sx_user.UID = sx_admin.AUID') -> select();
$Re = $Admin -> join(array('sx_admin ON sx_user.UID = sx_admin.AUID')) -> select();
//下面这个可以
$M = M();
$r = $M->query("select * from sx_admin LEFT JOIN sx_user ON sx_admin.AUID = sx_user.UID");
var_dump($Re);exit;
上面的查询我很不理解thinkphp join()的用法,为什么原生语句可以查询到,而join()只能返回false,求THINKPHP达人指正 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询