2011-06-06 63 views
0
CREATE PROCEDURE GetHandTypes() 
BEGIN 
    SELECT * FROM Codemst WHERE code LIKE "HT%" AND dep > 0; 
END$$ 

$result = mysql("CALL GetHandTypes()"); 
$row = mysql_fetch_assoc($result); 
mysql_free_result($result); 

它工作的很好。但是當我嘗試兩次時,它什麼都不返回。mysql&php - 不能執行存儲過程兩次

$result = mysql_query("CALL GetHandTypes()"); 
$row = mysql_fetch_assoc($result); 
mysql_free_result($result); 
print_r($row); 

$result = mysql_query("CALL GetHandTypes()"); 
$row = mysql_fetch_assoc($result); 
mysql_free_result($result); 
print_r($row); //null 

回答