Jump to content
Fórum Script Brasil
  • 0

(Resolvido) Dúvida PROCEDURE ...


moiseslinegt
 Share

Question

Pessoal estou com um problema ao fazar a chamada de um PROCEDURE; Já li, reli e tentei de todos os modos mas não deu certo;

Procedure

DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `sp_ResumoCampanha`(
pCodigo INT,
pDataInicio DATETIME,
pDataTermino DATETIME,
pConteudos VARCHAR(65000),
pVeiculos VARCHAR(65000),
pCidades VARCHAR(65000),
pEstados VARCHAR(65000),
pTipo INT
)
BEGIN .....
P.S - eu não passo todos os parâmetros; alguns são setados no banco, estes são os -únicos parâmetros obrigatórios
PHP

include 'connect.php';
$stmt=$conn->prepare("CALL sp_ComprovanteVeiculacao(?,?,?,?)");
if(!$stmt){
echo 'erro';
}
stmt->param(2, $pCodigo, PDO::PARAM_INT, 10);
stmt->param(3, $pDataInicio, PDO::PARAM_STR,10);
stmt->param(4, $pDataTermino, PDO::PARAM_STR, 10);
$stmt->execute();

O que está errado???

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Forum Statistics

    • Total Topics
      149.8k
    • Total Posts
      646.6k
×
×
  • Create New...