[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Stocated procedures and php

Posted on 2002-05-10
5
Medium Priority
?
515 Views
Last Modified: 2013-12-09
I have a stocated procedure in interbase and i want to execute this procedure with php.
What i actually did is that i execute the procedure but i can't acces the result that the procedure is returning.
I have tried this:

        $sql_stat = 'execute procedure get_trn_id RETURNING_VALUES :var';
     $res = ibase_query($dbh, $sql_stat);        

the result should be in the variable 'var' but i get an error message looking like this:

Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 29
RETURNING_VALUES
Statement: EXECUTE PROCEDURE get_trn_id RETURNING_VALUES :sumb

So, help please!!
0
Comment
Question by:lindu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:YodaMage
ID: 7006781
Lets see the SQL of your procedure.

I think you want somethin like:

PROCEDURE get_trn_id  
RETURNS (
    NUM INTEGER)
AS
begin
  NUM = {Whatever code needed to get you var};
end
0
 
LVL 1

Accepted Solution

by:
thegroup earned 100 total points
ID: 7027866
You could use:

select sumb from get_trn_id into :sumb

That way the select statement extract the values and put them in the variable :sumb.

(I don't know exactly the php sintax that executes a query)
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7096337
Please update and finalize this question.  Experts, if no response in 7 days, please provide me with closing recommendations.
Thanks,
Moondancer - EE Moderator
0
 
LVL 4

Expert Comment

by:YodaMage
ID: 7096373
Split them.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7100486
Thanks for returning and finalizing this.  Can you please tell us where we "missed" giving you A level response here?  If the grade was given in error, I can correct this for you.

More about grades here:
http://www.experts-exchange.com/new_users/Q_20310437.html

Thanks
Moondancer - EE Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What we learned in Webroot's webinar on multi-vector protection.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question