您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

mysql-新浪sae, 微信公众平台的MySQL链接问题

2024/2/27 19:17:58发布12次查看
mysqlsae
elseif($keyword==绩效查询)
{
$msgtype = text;
$contentstr = 请输入您的学号;
$resultstr = sprintf($texttpl, $fromusername, $tousername, $time, $msgtype, $contentstr);
}else if(is_numeric($keyword)){
if(strlen($keyword)==7)
{
//////
$contentstr = 进入 if(strlen($keyword)==7);
$resultstr = sprintf($texttpl, $fromusername, $tousername, $time, $msgtype, $contentstr);
////
$con = mysql_connect(sae_mysql_host_m.':'.sae_mysql_port,sae_mysql_user,sae_mysql_pass); if(!$con) { ////// $contentstr = 进入 if(!$con); $resultstr = sprintf($texttpl, $fromusername, $tousername, $time, $msgtype, $contentstr); //// die('could not connect:'.mysql_error()); }else{ ///// $contentstr = 进入else; $resultstr = sprintf($texttpl, $fromusername, $tousername, $time, $msgtype, $contentstr); ///// mysql_select_db(app_cjcx123,$con); $query = sprintf(select * from table1 where xm = 1450375); $result = mysql_query($query); while ($row = mysql_fetch_assoc($result)) { $contentstr=$row['xm'].$row['cj']; mysql_close($con); } } }else if(!is_numeric($keyword)){ $msgtype = text; $contentstr = 学号错误,请重新输入; $resultstr = sprintf($texttpl, $fromusername, $tousername, $time, $msgtype, $contentstr); }else{ $contentstr = input something...; $resultstr = sprintf($texttpl, $fromusername, $tousername, $time, $msgtype, $contentstr); } } 这是源码。加了几个输出,卡到 $con = mysql_connect(sae_mysql_host_m.':'.sae_mysql_port,sae_mysql_user,sae_mysql_pass); 这一句,后面的if else 都没进去,求教,连接数据库的 几个参数需要定义全局变量还是怎么弄
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product