Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 29956 | Replies: 3 | Solved
![]() |
•
•
Join Date: Mar 2006
Posts: 2
Reputation:
Rep Power: 0
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: 1
Reputation:
Rep Power: 0
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.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)





Linear Mode