| | |
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.
•
•
Join Date: Nov 2009
Posts: 2
Reputation:
Solved Threads: 0
0
#8 5 Days Ago
mysql Syntax (Toggle Plain Text)
DROP PROCEDURE IF EXISTS `UsersR_DELETE_byPK` GO CREATE PROCEDURE UsersR_DELETE_byPK ( IN UsersID INT(11) ) BEGIN DELETE FROM UsersR WHERE UsersID=UsersID; END
Last edited by nav33n; 5 Days Ago at 6:25 am. Reason: Please use [code] tags to wrap your code.
![]() |
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: drop down menu
- Next Thread: Help with stored procedure
| Thread Tools | Search this Thread |
# address apache api array autoincrement beginner binary broken cakephp checkbox class clean cms code countingeverycharactersfromastring crack cron curl database date decode dehasher directory display dissertation dynamic echo email error fairness file files folder form forms function functions google href htaccess html image include incode insert ip javascript joomla legislation limit link login mail masterthesis match menu method mlm multiple mysql newsletters oop pagerank paypal pdf persist php play protocol query question radio random remote root script search server sessions simple sms soap source space spam sql support! syntax system table tutorial update upload url validator variable video web youtube





