联系官方销售客服

1835022288

028-61286886

POSCMS 版主:POSCMS负责人
语句查询不出数据;数据库字段的值是品宣注册涨粉招商门店推广
类型:POSCMS 更新时间:2020-11-04 17:13:00 where like from module

{list action=sql module=ad sql='select * from @#1_ad where yxfaggmd like '%\"品宣\"%' order by rand() LIMIT 0,3' }语句查询不出数据;


数据库字段yxfaggmd的值是["品宣","注册","涨粉","招商","门店推广"]

回帖
  • POSCMS负责人
    #1楼    POSCMS负责人
    2020-11-04 16:45:48
    Chrome 0
    语法错了,{体内不能有双引号}
  • 传播易
    #2楼    传播易
    2020-11-04 16:47:19
    Chrome 0
    POSCMS负责人 :要怎么修改?试过很多方法都没办法调出来
  • 传播易
    #3楼    传播易
    2020-11-04 16:50:05
    Chrome 0
    POSCMS负责人 <?php $da_arr = $ci->db->query("SELECT xingye,szcs,tgfs,guanggaomude FROM dr_1_form_znggtffaxt where uid=$member[uid] ORDER BY inputtime DESC LIMIT 0,1")->row_array(); $ggmd= $da_arr[guanggaomude]; ?> {list action=sql sql='select * from @#1_ad where yxfaggmd like '%$ggmd%' order by rand() LIMIT 0,3' }
  • POSCMS负责人
    #4楼    POSCMS负责人
    2020-11-04 16:51:54
    Chrome 0
    <?php $sql=urlencode("select * from @#1_ad where yxfaggmd like '%\"品宣\"%' order by rand() LIMIT 0,3");?>
    {list action=sql module=ad sql='$sql' }
  • 传播易
    #5楼    传播易
    2020-11-04 16:59:40
    Chrome 0
    POSCMS负责人 <?php $da_arr = $ci->db->query("SELECT xingye,szcs,tgfs,guanggaomude FROM dr_1_form_znggtffaxt where uid=$member[uid] ORDER BY inputtime DESC LIMIT 0,1")->row_array(); $ggmd= $da_arr[guanggaomude]; ?> <?php $sql=urlencode("select * from @#1_ad where yxfaggmd like '%$ggmd%' order by rand() LIMIT 0,3");?> {list action=sql module=ad sql='$sql' }依旧调不出数据
  • POSCMS负责人
    #6楼    POSCMS负责人
    2020-11-04 17:00:30
    Chrome 0
    <?php $sql=urlencode("select * from @#1_ad where yxfaggmd like '%\"品宣\"%' order by rand() LIMIT 0,3");?>
    {list action=sql module=ad sql='$sql' }
    {/list}
    {$error} {$sql} 看这里输出
  • 传播易
    #7楼    传播易
    2020-11-04 17:03:20
    Chrome 0
    POSCMS负责人 select * from @#1_ad where yxfaggmd like '%"品宣"%' order by rand() LIMIT 0,3 这是输出的语句
  • POSCMS负责人
    #8楼    POSCMS负责人
    2020-11-04 17:08:17
    Chrome 0
    <?php $sql=urlencode("select * from @#1_ad where yxfaggmd like '%品宣%' order by rand() LIMIT 0,3");?>
  • 传播易
    #9楼    传播易
    2020-11-04 17:10:15
    Chrome 0
    POSCMS负责人 select * from @#1_ad where yxfaggmd like '%品宣%' order by rand() LIMIT 0,3 依旧没有数据
  • 传播易
    #10楼    传播易
    2020-11-04 17:10:52
    Chrome 0
    POSCMS负责人 <?php $da_arr = $ci->db->query("SELECT xingye,szcs,tgfs,guanggaomude FROM dr_1_form_znggtffaxt where uid=$member[uid] ORDER BY inputtime DESC LIMIT 0,1")->row_array(); $ggmd= $da_arr[guanggaomude]; ?> <?php $sql=urlencode("select * from @#1_ad where yxfaggmd like '%$ggmd%' order by rand() LIMIT 0,3");?> {list action=sql module=ad sql='$sql' } <tr> <td style="width: 440px"><div class="mediapart"> <label class="fl"> <a href="{$t.url}" target="_blank"><img src="{dr_get_file($t[thumb])}" class="mtimg" alt="{$t.title}"></a> </label> <div class="grp fl"> <div class="pb2"> <b class="account_name"> <a href="{$t.url}" target="_blank">{$t.title}</a> </b> </div> <div class="desc">{$t.description}</div> </div> </div></td> <td style="width: 101px" class="tdpadd"><span>{dr_cat_value('1-ad', $t.catid, 'name')}</span></td> <td style="width: 101px" class="tdpadd"><span class="red now_money"> ¥ {$t.order_price} </span></td> <td style="width: 100px; text-align:center;"><p><a href="{$t.url}" class="xsca" target="_blank">查看详情</a></p></td> </tr> {/list}{$error} {$sql}这是完整的代码
  • 第几个一百天
    #11楼    第几个一百天
    2020-11-04 17:13:00
    Chrome 0
    <?php $sql=urlencode("select * from @#1_ad where yxfaggmd like '%".$ggmd."%' order by rand() LIMIT 0,3");?>赋值错了吧