Re: Calling a stored procedure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 30, 2007 5:16 PM, Dan Shirah <mrsquash2@xxxxxxxxx> wrote:
> ALMOST have it!
>
> I have changed the code to this:
>
> if ($num_rows > 0 && $barcode_id == "") {
>  echo "The query found ".$num_rows." row(s)";
>  $procedure = "Execute Procedure informix.updt_brcd_id_req('$case',
> '$event_date', '$event_sequence', '$event_code')";
> print_r ($procedure);
>  $run = ifx_query($procedure, $connect_id);
>  }
>
> When I submit the form it gives me this error: PHP Warning: ifx_query() [
> function.ifx-query <http://develop1/ExigenUpdate/function.ifx-query>]:
> Execute immediate fails
>
> BUT!!!!!!!   The stored procedure still runs and updates my data correctly.
>
> Any ideas what might be throwing that error and how to get rid of it?
>
> Thanks!
> Dan

    To silence the error (which isn't fixing it, just shutting it up)
just add a @ before the function call.

<?
if ($num_rows > 0 && $barcode_id == "") {
 echo "The query found ".$num_rows." row(s)";
 $procedure = "Execute Procedure informix.updt_brcd_id_req('$case',
'$event_date', '$event_sequence', '$event_code')";
print_r ($procedure);
 $run = @ifx_query($procedure, $connect_id);
 }
?>

    Again, that won't fix it, but it will shut it up.  Though ignoring
warnings is never considered a Good Idea[tm].

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux