RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 29956 | Replies: 3 | Solved
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: 1
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: 1
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  
Join Date: Sep 2008
Posts: 1
Reputation: thinktejas is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
thinktejas thinktejas is offline Offline
Newbie Poster

Re: PHP MySQL 5.0 stored procedure

  #4  
Sep 10th, 2008
There is an article on this site which shows how to access Mysql Stored procedures using PDO and PHP
http://tejuspratap.co.cc/2008/08/29/...-using-php-50/
Last edited by thinktejas : Sep 10th, 2008 at 4:39 am.
Reply With Quote  
Reply

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

Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:46 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC