Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select 问题 #2

Closed
hyxj1220 opened this issue Oct 26, 2017 · 1 comment
Closed

select 问题 #2

hyxj1220 opened this issue Oct 26, 2017 · 1 comment

Comments

@hyxj1220
Copy link

hyxj1220 commented Oct 26, 2017

$cols = array($cols);

这里貌似存在问题,如果按此写法
global $db;
$result = $db->select('mid as userid,nickname as username,field1,field2,field3,field4,field5,field6,field7,field8')->from('user')->where('mid= :mid')->bindValues(array('mid'=>$uid))->row();

输出的sql是:SELECT mid as userid,nickname AS username,field1,field2,field3,field4,field5,field6,field7,field8 FROM member WHERE mid= :mid 错误在于把后面的字段都作为了nickname的别名了

这一行【第219行】改成$cols = explode(',', $cols); 合理点

@walkor
Copy link
Owner

walkor commented Oct 26, 2017

感谢反馈,已经修改。

@walkor walkor closed this as completed Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants