PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 27th, 2006, 09:17 PM
Dmitry85 Dmitry85 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 Dmitry85 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
MDB2 Stored Proc

Could someone please explain how to use executeStoredProc for mysql to get the OUT parameters of a stored procedure?

Reply With Quote
  #2  
Old October 28th, 2006, 12:30 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,729 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 1 h 32 m 7 sec
Reputation Power: 6
RE: MDB2 Stored Proc

your OUT params should be going into a user variable (@var). then you can select that var to find out what it says.

Reply With Quote
  #3  
Old October 29th, 2006, 07:51 AM
Dmitry85 Dmitry85 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 Dmitry85 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: MDB2 Stored Proc

But how can I select it?
Let's say I have a simple SP getNameByID (IN id INT, OUT Name TINYTEXT)

I do like this:
executeStoredProc ('getNameByID', array('1','@name'))
But How can I get @name now using PHP?

And the other question is whay is the difference between $result_class and $result_wrap_class (two other parameters in ExecuteStoredProc())?
Thanks

Reply With Quote
  #4  
Old October 29th, 2006, 07:36 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,729 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 1 h 32 m 7 sec
Reputation Power: 6
RE: MDB2 Stored Proc

I don't know MDB - I know mysql stored procedures in which case you would do a simple select of @name.

SELECT @name

Reply With Quote
  #5  
Old October 29th, 2006, 07:44 PM
Dmitry85 Dmitry85 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 Dmitry85 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: MDB2 Stored Proc

Thanks. I know how to get it in MySQL, but I need to know how to do it in MDB2.

Reply With Quote
  #6  
Old March 8th, 2007, 07:53 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: MDB2 Stored Proc

I m doing this:
$mysqli=mysqli_query($link, "call('1','@name')");
$name=mysql_query("select @name");

after display $name= resourceId#4
$name1=mysql_fetch_array($name);

$name1 displays Array.

Is this code correct?
I need to get the value in @name in $name. how to do it? please help

Reply With Quote
  #7  
Old March 8th, 2007, 09:11 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,729 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 1 h 32 m 7 sec
Reputation Power: 6
RE: MDB2 Stored Proc

you are crossing you extensions - using mysqli and mysql

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > MDB2 Stored Proc


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT