?
Solved

Stocated procedures and php

Posted on 2002-05-10
5
Medium Priority
?
511 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
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…
Suggested Courses

764 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