<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[如何在PHP调用存储过程]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Thu, 20 Jan 2011 14:54:38 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	在PHP调用存储过程返回结果集的时候，会提示：can&#039;t return a result set in the given context；解决can&#039;t return a result set in the given context的方法。<br/><br/><div class="code">&lt;?php&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;define(&#039;CLIENT_MULTI_RESULTS&#039;, 131072);&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;$link = mysql_connect(&quot;127.0.0.1&quot;, &quot;root&quot;, &quot;123&quot;,1,CLIENT_MULTI_RESULTS) or die(&quot;Could not connect: &quot;.mysql_error());&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;mysql_select_db(&quot;test&quot;) or die(&quot;Could not select database&quot;);&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;$sql = &quot;create procedure select_data()&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;begin&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;select * from user;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end;&quot;;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;mysql_query($sql);&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result = mysql_query(&quot;call test.select_data()&quot;) or die(&quot;Query failed:&quot; .mysql_error());&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while($row = mysql_fetch_array($result, MYSQL_ASSOC))&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$line = &#039;&lt;tr&gt;&lt;td&gt;&lt;a target = _blank href=&#92;&#039;&#039;.$row&#91;&quot;name&quot;&#93;.&#039;&#92;&#039;&gt;&#039;.$row&#91;&quot;name&quot;&#93;.&#039;(&#039;.$row&#91;&quot;pwd&quot;&#93;.&#039;)&#039;.&#039;&lt;/a&gt;&lt;/td&gt;&lt;/t&nbsp;&nbsp;<br/>r&gt;&#039;;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $line;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;&#92;n&quot;);&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;&nbsp;&nbsp; <br/>?&gt;</div><br/><br/>来源：http://code.haohailuo.com/article-325.html
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] 如何在PHP调用存储过程]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>