| | |
PHP MySQL 5.0 stored procedure
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved
![]() |
•
•
Join Date: Mar 2006
Posts: 2
Reputation:
Solved Threads: 1
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);
?>
<?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);
?>
•
•
Join Date: Sep 2008
Posts: 3
Reputation:
Solved Threads: 1
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/
http://tejuspratap.co.cc/2008/08/29/...-using-php-50/
Last edited by thinktejas; Sep 10th, 2008 at 4:39 am.
•
•
Join Date: Jan 2009
Posts: 16
Reputation:
Solved Threads: 3
Here's a quick tutorial on executing mysql stored procedures in php using mysql, mysqli, and pdo for the people using the different database extension:
http://www.joeyrivera.com/2009/using...ysqlmysqlipdo/
http://www.joeyrivera.com/2009/using...ysqlmysqlipdo/
•
•
Join Date: Sep 2008
Posts: 3
Reputation:
Solved Threads: 1
•
•
•
•
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/
•
•
Join Date: Sep 2008
Posts: 3
Reputation:
Solved Threads: 1
I am sorry I gave the wrong url before.
The article has been moved to http://www.tejuspratap.com/main/cont...s-using-php-50
The article has been moved to http://www.tejuspratap.com/main/cont...s-using-php-50
Last edited by thinktejas; Jul 16th, 2009 at 4:26 am. Reason: I gave the wrong url before.
![]() |
Similar Threads
- PHP and MySQL Web Development (PHP)
- free php/mysql programming (Web Development Job Offers)
- master database with php mysql (Legacy and Other Languages)
- Stored procedure call with ADO (C)
- Integrating Apache with PHP and MySQL (Linux Servers and Apache)
- Using PHP, MySQL and Apache Server (PHP)
Other Threads in the PHP Forum
- Previous Thread: Image Uploading error??
- Next Thread: PHP, APACHE and MSSQL
| Thread Tools | Search this Thread |
.htaccess apache api array autocomplete binary broken cakephp class cms code convert cron curl database dataentry date date/time display duplicates dynamic ebooks email emptydisplayvalue error execute explodefunction file firstoptioninphpdroplist folder form forms function functions hack href htaccess html htmlspecialchars image include ip javasciptvalidation javascript joomla keywords limit link list login mail matching mediawiki menu methods multiple mycodeisbad mysql network number object oop paypal pdf php phpincludeissue query random recursive redirect remote script search securephp seo server sessions shot source sp space speed sql subdomain subscription system table tag tutorial tutorials upload url validator variable vbulletin video web webdesign white youtube





