RE: [PHP] Calling a stored procedure
- From: warren@xxxxxxxxxxxx ("Warren Vail")
- Date: Fri, 30 Nov 2007 11:05:16 -0800
I believe you need to send the call to the stored procedure to the database
as if it were a query, instead of asking PHP to execute it.
HTH,
Warren Vail
-----Original Message-----.
From: Dan Shirah [mailto:mrsquash2@xxxxxxxxx]
Sent: Friday, November 30, 2007 10:57 AM
To: Daniel Brown
Cc: php-general
Subject: Re: [PHP] Calling a stored procedure
I'm not sure if we're on the same page.
I have a stored procedure on my Informix server. All I am trying to do is
create a simple form that when submitted will pass several parameters to
the
stored procedure and execute it.
I shouldn't have to pass the head/body/content to the Informix server to
execute the procedure, right?
On 11/30/07, Daniel Brown <parasane@xxxxxxxxx> wrote:
On Nov 30, 2007 1:39 PM, Dan Shirah <mrsquash2@xxxxxxxxx> wrote:
Hello all,procedure
I am having soem difficulty when trying to call an INFORMIX stored
with PHP.parameters I
I have verified that the if() condition is true and all of the
am passing are valid. However, when I run the following:'$event_date',
if ($num_rows > 0 && $barcode_id == "") {
echo "The query found ".$num_rows." row(s)";
$call_procedure = "CALL informix.updt_brcd_id_req('$case',
'$event_sequence', '$event_code')";query()
$call_result = $connect_id->query($call_procedure);
}
I get this error message: PHP Fatal error: Call to a member function
on a non-objecteven
I have never tried to call a stored procedure in PHP before so I'm not
sure if I am on the right track.
Any help is greatly appreciated.
Dan
You have to first instantiate the class.
For example:
<?
include_once("classes/layout.class.php");
$H = new Head();
$B = new Body();
$P = new Page($H, $B);
$H->title("A Sample PHP Page");
$H->css("sample.css");
$B->content("This is where Dan Shirah's content would go.");
$P->render();
?>
--
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.
- References:
- Calling a stored procedure
- From: "Dan Shirah"
- Re: [PHP] Calling a stored procedure
- From: "Daniel Brown"
- Re: [PHP] Calling a stored procedure
- From: "Dan Shirah"
- Calling a stored procedure
- Prev by Date: Re: [PHP] Calling a stored procedure
- Next by Date: Re: newbie question on escaping strings
- Previous by thread: Re: [PHP] Calling a stored procedure
- Index(es):
Relevant Pages
|
|