Need PHP (as the mainstream development language now) call the stored procedure, return a result set, found very difficult, find a half-day, finally found in the Foreigner's Forum solution, here localization.
The key is two.
1) define (Client_multi_results, 131072);
2) $link = MySQL (the best combination with PHP) _connect ("127.0.0.1", "Root", "" ", 1,client_multi_results) or Die (" Could Not Connect: "). MySQL (and PHP collocation of the best combination) _error ());
The following can be used normally, the following is an example program.
Define (Client_multi_results, 131072);
$link = MySQL (the best combination with PHP) _connect ("127.0.0.1", "Root", "" ", 1,client_multi_results) or Die (" Could Not Connect: "). MySQL (and PHP collocation of the best combination) _error ());
MySQL (and PHP collocation best combination) _select_db ("vs") or Die ("Could not select Database");
?>
$result = MySQL (best combination with PHP) _query ("Call get_news_from_class_id (2)") or Die ("Query failed:"). MySQL (and PHP collocation of the best combination) _error ());
while ($row = MySQL (best combination with PHP) _fetch_array ($result, MySQL (best combination with PHP) _ASSOC))
{
$line =. $row ["title"]. (. $row ["Page_time"].). r>;
Echo $line;
printf ("");
}
MySQL (the best combination of PHP collocation) _free_result ($result);
?>
MySQL (the best combination of PHP collocation) _close ($link);
?>
http://www.bkjia.com/PHPjc/508628.html www.bkjia.com true http://www.bkjia.com/PHPjc/508628.html techarticle need PHP (as the mainstream development language now) call the stored procedure, return a result set, find very difficult, find a half-day, finally found the solution on the Foreigner's Forum, here Local ...