xubi Posted July 21, 2008 Share Posted July 21, 2008 hi... i have created StoreProcedure on MySQL.... and my StrProc name is browseUsers1(); i am retriving my SP like this.... where DBConnect() is my class.... please help me its very urgent...... send me the whole Code.... <?php include "../header.php"; $header = new SiteHeader(); $header->GetHeaderBlind("../Styles/Styles.css"); $db=new DBConnect(); $result = $db->query("EXEC browseUsers1()"); echo $result ; ?> Link to comment https://forums.phpfreaks.com/topic/115816-how-can-i-access-my-storeprocedure-using-php/ Share on other sites More sharing options...
samshel Posted July 21, 2008 Share Posted July 21, 2008 try select browseUsers1() Link to comment https://forums.phpfreaks.com/topic/115816-how-can-i-access-my-storeprocedure-using-php/#findComment-595384 Share on other sites More sharing options...
xubi Posted July 21, 2008 Author Share Posted July 21, 2008 No this solution is not working.... i have used Select statement before my StoreProcedure but its not working,..... <?php include "../header.php"; $header = new SiteHeader(); $header->GetHeaderBlind("../Styles/Styles.css"); $db=new DBConnect(); $result = $db->query("Select browseUsers1()"); echo $result; ?> Please send me the correct Solution.... Link to comment https://forums.phpfreaks.com/topic/115816-how-can-i-access-my-storeprocedure-using-php/#findComment-595395 Share on other sites More sharing options...
samshel Posted July 21, 2008 Share Posted July 21, 2008 1) what does browseUsers1() do ? 2) echo $result; you are trying to echo the mysql_result object? 3) is it displaying any error? Link to comment https://forums.phpfreaks.com/topic/115816-how-can-i-access-my-storeprocedure-using-php/#findComment-595396 Share on other sites More sharing options...
xubi Posted July 21, 2008 Author Share Posted July 21, 2008 1.browseUsers1(); browseUsers1 will fetch the whole records from User Table.... and its not displaying any sort of Error... ! its Blank,...... Link to comment https://forums.phpfreaks.com/topic/115816-how-can-i-access-my-storeprocedure-using-php/#findComment-595408 Share on other sites More sharing options...
samshel Posted July 21, 2008 Share Posted July 21, 2008 $result = $db->query("Select browseUsers1()") or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/115816-how-can-i-access-my-storeprocedure-using-php/#findComment-595411 Share on other sites More sharing options...
xubi Posted July 21, 2008 Author Share Posted July 21, 2008 Again its not displaying any sort of error... please tell me why its not working..... <?php include "../header.php"; $header = new SiteHeader(); $header->GetHeaderBlind("../Styles/Styles.css"); $db=new DBConnect(); $result = $db->query("Select browseUsers1()") or die(mysql_error()); echo $result; ?> <?php $header->GetFooter(); ?> Link to comment https://forums.phpfreaks.com/topic/115816-how-can-i-access-my-storeprocedure-using-php/#findComment-595417 Share on other sites More sharing options...
samshel Posted July 21, 2008 Share Posted July 21, 2008 if you use Select browseUsers1(); on your mysql prompt or phpmyadmin interface, does it return records? if it is returning records, you can fetch row and then var_dump that row to debug... Link to comment https://forums.phpfreaks.com/topic/115816-how-can-i-access-my-storeprocedure-using-php/#findComment-595439 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.