我有以下存储过程:
CREATE DEFINER=`CNX`@`%` PROCEDURE `sp_Facturatie_OpenstaandeBetalingen_Get`(OUT spResult varchar(200))
BEGIN
DECLARE exit handler for SQLEXCEPTION
BEGIN
GET DIAGNOSTICS CONDITION 1 @sqlstate = RETURNED_SQLSTATE,
@errno = MYSQL_ERRNO, @text = MESSAGE_TEXT;
SET spResult = left(CONCAT("ERROR ", @errno, " (", @sqlstate, "): ", @text),200);
END;
SET spResult = 'TRUE';
/*SELECT @spResult;*/
SELECT *
FROM Web_tblAfspraakBetalingen AB
LEFT OUTER JOIN Web_tblBetaalStatus BS
ON AB.betalingbetaalstatusid = BS.betaalstatusid
LEFT OUTER JOIN Web_tblBetaalMethode BM
ON AB.betalingbetaalmethodeid = BM.betaalmethodeid
WHERE BS.betaalstatusomschrijving <> 'Betaald'
ORDER BY betalingid ASC;
END
我想在 PHP 中使用 PHP 中的 MySqli 以 Procedural 风格调用这个存储过程。在 PHP 中尝试了很多不同的代码。有人可以建议我如何做到最好吗?
茅侃侃