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 402,659 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 2,248 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: 24384 | Replies: 2
Reply
Join Date: Jan 2006
Posts: 29
Reputation: rcasinillo_s is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
rcasinillo_s rcasinillo_s is offline Offline
Light Poster

PHP MySQL 5.0 stored procedure

  #1  
Mar 15th, 2006
Any could give me a PHP script on how to call or execute mysql stored procedure.

Thank you.

Roland
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2006
Posts: 2
Reputation: ameer is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ameer ameer is offline Offline
Newbie Poster

Re: PHP MySQL 5.0 stored procedure

  #2  
Mar 21st, 2006
Before you installed the php_mysqli.dll


<?php

/* Connect to a MySQL server */
$link = mysqli_connect(
'localhost', /* The host to connect to */
'root', /* The user to connect as */
'root', /* The password to use */
'db_name'); /* The default database to query */

if (!$link) {
printf("Can't connect to MySQL Server. Errorcode: %s\n", mysqli_connect_error());
exit;
}


/* Send a query to the server */
if ($result = mysqli_query($link, "call se_proc('crm')")) {


/* Fetch the results of the query */
while( $row = mysqli_fetch_array($result) ){

echo ($row[0]. "--------- SR. " . $row[1] . "<br>");

}

/* Destroy the result set and free the memory used for it */
mysqli_free_result($result);
}

/* Close the connection */
mysqli_close($link);
?>
Reply With Quote  
Join Date: May 2008
Posts: 1
Reputation: kladizkov is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kladizkov kladizkov is offline Offline
Newbie Poster

Re: PHP MySQL 5.0 stored procedure

  #3  
May 4th, 2008
Oh it was simple, just execute "call proc_name"

http://fabinm.com/content/view/17/9/
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 3:37 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC