php 调用mysql存储过程
//$sql="SELECTspda.dnm,spmcFROMa_spdaspdaleftjoina_tmtmonspda.dnm=tm.dnmORtm.tmlike'%...
// $sql = "SELECT spda.dnm,spmc FROM a_spda spda left join a_tm tm on spda.dnm=tm.dnm OR tm.tm like '%" .$keyword. "%' where spmc like '%"
.$keyword. "%' or spda.dnm like '%" .$keyword. "%' limit 20 ";//or tm.tm like '%" .$keyword. "%'
$sql = "call wg_spda_dear('".$keyword."')";
$result = mysql_query($sql,$con);//执行SELECT查询
while($res = mysql_fetch_array($result, MYSQL_ASSOC) )
{
$contentStr1 .= $res['spmc'] . $res['dnm']."\r\n";
}
如上,直接使用sql语句就可以,用存储过程就不行,求解决方案 展开
.$keyword. "%' or spda.dnm like '%" .$keyword. "%' limit 20 ";//or tm.tm like '%" .$keyword. "%'
$sql = "call wg_spda_dear('".$keyword."')";
$result = mysql_query($sql,$con);//执行SELECT查询
while($res = mysql_fetch_array($result, MYSQL_ASSOC) )
{
$contentStr1 .= $res['spmc'] . $res['dnm']."\r\n";
}
如上,直接使用sql语句就可以,用存储过程就不行,求解决方案 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
1个回答
2015-09-30
展开全部
<bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
configure:3427: gcc --version >&5
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3427: gcc --version >&5
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询