我在mysql workbench中创建了一个存储过程。我试图在PHP中调用它,我得到以下错误:
Warning: mysql_query() expects parameter 1 to be string, resource given in
C:\xampp\htdocs\Project1\storedProcedure1.php on line 9
$res = mysql_query($connection, "CALL getPlayers1()") or
die("Query fail to launch:".mysql_error());
请问任何建议?
顺便说一句,我的存储过程如下:
DELIMITER $$
CREATE PROCEDURE GetPLayers()
begin
select player_id, name, gender, playing_career,dob,place_of_birth
from players;
end $$