php 存储过程

<?php
$con=mysql_connect("192.168.1.200","root","123456",true,120000);

mysql_select_db("lost_treasure",$con);
mysql_query("set names 'gb2312'");
$res = mysql_query("set @id=6", $con);
$res = mysql_query("call shop_getById(@id)", $con);
while($row = mysql_fetch_array($res))
{
  $arr[]=$row;
}
echo $arr[0][2];
?>

posted @ 2011-01-27 15:56  王翔(kingfly)  阅读(220)  评论(0编辑  收藏  举报