select SUM 求和中带模糊查询怎么弄? 本帖最后由 hackol 于 2014-05-12 23:39:33 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 包含 nameuser 的 是什么意思? 比如用户admin 查询就查询到 nameuser 这个字段中admin的信息 例:查询用户为adminusername字段中等于admin以及 regfrom 字段中包含 admin的得出的结果为:10+10+20+30+20查询用户为b123456username字段中等于b123456以及 regfrom 字段中包含 b123456 的得出的结果为:20+30+20 $username=$_REQUEST['username'];$sql="select username, SUM(smoney) as t1 from record where username='$usename'"; regfrom 字段中还要包含 $usename 这一段没有呢? $sql="select username, SUM(smoney) as t1 from record where username='$usename' or instr(regfrom, '$username') >0"; uchome,x-space,wordpress有什么区别? 没有双引号的JSON格式,有什么办法用PHP解开吗 匹配字典数据,最快算法。 我是PHP菜鸟,求助!! PHP实现多文件上传 请教各位大大sugarCRM有没有中文开发手册.有的话麻烦发一下谢谢. 为什么我的php文件无法执行 大家看下小米论坛的首页index.html数据是怎样调用出来的,好奇怪呀 这个网站的前台你们还有参考? 微信oauth2的access_token问题。。 为什么CodeIginter的数据库操作要这么实现 请教discuz注册问题
查询用户为admin
username字段中等于admin
以及 regfrom 字段中包含 admin的
得出的结果为:10+10+20+30+20查询用户为b123456
username字段中等于b123456
以及 regfrom 字段中包含 b123456 的
得出的结果为:20+30+20
$sql="select username, SUM(smoney) as t1 from record where username='$usename'";