(PHP 4, PHP 5, PHP 7)
odbc_execute — Executa um comando preparado
$result_id
[, array $parameters_array
] ) : boolExecuta um comando preparado com odbc_prepare().
result_id
The result id resource, from odbc_prepare().
parameters_array
Parâmetros em parameter_array
serão
substituídos por marcadores na ordem no comando preparado.
Elementos desta matriz serão convertidos para strings ao chamar esta
função.
Any parameters in parameter_array
which
start and end with single quotes will be taken as the name of a
file to read and send to the database server as the data for the
appropriate placeholder.
Retorna true
em caso de sucesso ou false
em caso de falha.
Exemplo #1 odbc_execute() and odbc_prepare() example
In the following code, $success will only be
true
if all three parameters to myproc are IN parameters:
<?php
$a = 1;
$b = 2;
$c = 3;
$stmt = odbc_prepare($conn, 'CALL myproc(?,?,?)');
$success = odbc_execute($stmt, array($a, $b, $c));
?>
If you need to call a stored procedure using INOUT or OUT parameters, the recommended workaround is to use a native extension for your database (for example, oci8 for Oracle).