User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 428,570 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,629 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 923 | Replies: 2 | Solved
Reply
Join Date: Jun 2007
Posts: 18
Reputation: tunday is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
tunday tunday is offline Offline
Newbie Poster

What's suitable for a MySQLi CALL Statement?

  #1  
Jun 29th, 2007
Hi. I'm currently trying my hands on PHP and MySQL.
I understand how to retrieve results from SELECT statements in PHP? However, I'm not exactly sure of how to do it when a procedure call is made e.g.
 
$query = "CALL mach_validity($student_id, @result)";
if ($result = $mysqli->query($query)
{ while($row = $result->fetch_assoc())
   { $ returned_val =$row['@result']}
}
...(code continues)
1 row is expected from the CALL statement so there may be no need of the While Loop.
Can someone please help?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Posts: 4,782
Reputation: iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light 
Rep Power: 17
Solved Threads: 319
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Industrious Poster

Re: What's suitable for a MySQLi CALL Statement?

  #2  
Jun 30th, 2007
I'm not a programmer. My attitude starts with ignorance, holds steady at conversation, and ends with a trip to the hospital. Get used to it.
Reply With Quote  
Join Date: Jun 2007
Posts: 18
Reputation: tunday is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
tunday tunday is offline Offline
Newbie Poster

Re: What's suitable for a MySQLi CALL Statement?

  #3  
Jul 5th, 2007
It's been helpful. I've decided to use IN parameters only while declaring local variables in the procedure to receive the values I need. I then add a SELECT statement of these variables within the procedure.Thank you for your help. It got me far.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 11:16 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC