在线等 - 使用 M() 之后后面的代码不执行

浏览:570 发布日期:2015/09/13 分类:求助交流 关键字: M() 之后不执行
微信应用的一部分. 在使用M方法执行SQL语句之后, 后面的代码就不执行了. 把M注释掉后, 后面的代码就正常.

求解, 在线等......

代码
---------------------

public function HandleSubscribe($openid){
//$this->handleText($openid.'关注了');
//insert into `wechatid_followed` (`wechatid`, `followed`) values ('%s','%s');

mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.
$charid = strtoupper(md5(uniqid(rand(), true)));
$guid = substr($charid,16, 6);


$q=sprintf("insert into `wechatid_followed` (`wechatid`, `followed`) values ('%s','Y');",$this->openid);
//$res111=M()->query($q);
$sql03=sprintf("insert into `user_gift_code` (`openid`, `barcode`,`barcodetype`) values ('%s','%s','FM');",$this->openid,$guid);
$sql04=$q."".$sql03;
//
//
//M()->query($sql04);

$this->news(
array(
"0"=>array(
'title'=>'欢迎您关注魔力泡泡购物。',
'Description'=>'请扫描条码换取礼品! 感谢您的关注,祝您一切顺利!',
'PicUrl'=>'barcode.php?size=200&text='.$guid,
'Url'=>'barcode-360200.php?s='.$guid,
),
)
)->reply();


//
}
最佳答案
评论( 相关
后面还有条评论,点击查看>>