Home  >  Article  >  Backend Development  >  thinkphp $group=D("SNS_USER_GROUP");会变成小写加上划线

thinkphp $group=D("SNS_USER_GROUP");会变成小写加上划线

WBOY
WBOYOriginal
2016-06-13 10:58:53794browse

thinkphp $group=D("SNS_USER_GROUP");会变成小写加下划线
$group=D("SNS_USER_GROUP");会变成小写加下划线

SELECT * FROM `s_n_s__u_s_e_r__g_r_o_u_p` ORDER BY group_id LIMIT 0,30
是在conf里面设置吗?自已的感觉
这是怎么回事,原来一直表名用小写,现在改了悲剧啊   有知道的兄弟告诉一下哈
------最佳解决方案--------------------
这个问题倒是没遇到过,不过倒是可以修改的。。
我记得D("SNS_USER_GROUP");就是实例化sns_user_group这个表吧。。
你可以去这里下载thinkphp手册看看:http://www.phpnewer.com/index.php/HandBook/index
------其他解决方案--------------------
不用d不就行了
------其他解决方案--------------------

引用:
不用d不就行了


M  或是new Model();
都不行


------其他解决方案--------------------
因为model里strtolower tablename了

你搜一下就知道了
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn