MySQL Forums
Forum List  »  PHP

PHP call MySQL Stored Procedure problem.
Posted by: Ekachai Singthong
Date: March 27, 2009 09:30PM

I use MySQL-Front tool create and call Stored Procedure successfully, but in my PHP code and phpMyAdmin it fails. How can i figure out this problem

when i run on phpMyAdmin the error show
#1305 - PROCEDURE joomla1.5.9.save_orders does not exist

this is my code of procedure

DROP PROCEDURE `save_orders`//
CREATE DEFINER=`root`@`localhost` PROCEDURE `save_orders`(
INOUT id int,
id_order varchar(10),
customercode varchar(10),
date_order varchar(10),
date_deliverly varchar(10)
)
DETERMINISTIC
SQL SECURITY INVOKER
BEGIN
IF id=0 THEN
INSERT INTO `vhc_orders` (
`id` , `id_order` ,
`customercode` , `date_order` ,
`date_deliverly` , `meet` ,
`base` , `notefromdale` ,
`jobmade` , `date_jobmade` ,
`datestart` , `timestart` ,
`dateback` , `timeback` ,
`realgo` , `srcprovince` ,
`desreal` , `no_tl` ,
`userid`
)
VALUES (
NULL , id_order,
customercode , date_order,
date_deliverly , NULL ,
NULL , NULL ,
0, NULL ,
NULL , NULL ,
NULL , NULL ,
NULL , NULL ,
NULL , NULL ,
NULL
);
SET id = LAST_INSERT_ID();

END IF;


END

Options: ReplyQuote


Subject
Written By
Posted
PHP call MySQL Stored Procedure problem.
March 27, 2009 09:30PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.