finalight Posted December 10, 2008 Share Posted December 10, 2008 here's a problem, i have this stored procedure : DELIMITER $$ DROP PROCEDURE IF EXISTS `hotel`.`test` $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `test`(recordStart int, endStart int) BEGIN SET @lim = CONCAT(' LIMIT ', recordStart, ',', endStart); SET @test = "SELECT * FROM event"; SET @q = CONCAT(@test, @lim); PREPARE st FROM @q; EXECUTE st; DEALLOCATE PREPARE st; END $$ DELIMITER ; and this is how i execute the stored procedure function test($upper, $lower){ $sql = "CALL test(?,?)"; $mainArr = array(); $sqlP = $this -> conn -> prepare($sql); $sqlP -> bind_param('ii',$upper, $lower); $sqlP -> execute(); //bind the result to the following variable(s) $sqlP -> bind_result($col1, $col2, $col3, $col4, $col5, $col6); // // //Retrive the result // $result = $sqlP -> store_result(); while($sqlP -> fetch()){ $arr = array(); $arr[0] = $col1; $arr[1] = $col2; $arr[2] = $col3; $arr[3] = $col4; $arr[4] = $col6; array_push($mainArr, $arr); } return $mainArr; } whenever i invoke this function, it will give me this pop up alert stating that 'an unhandled win32 exception occured in apache.exe[errCode]', the 'errCode' is different everytime though. however when i execute other stored procedures, nothing happen at all i'm using easyphp bundle for this development project can anyone tell me how to solve this error? Quote Link to comment https://forums.phpfreaks.com/topic/136346-win32-exception-in-calling-store-procedure-with-limit-as-parameter/ Share on other sites More sharing options...
finalight Posted December 12, 2008 Author Share Posted December 12, 2008 not sure if this's allowed, but bump Quote Link to comment https://forums.phpfreaks.com/topic/136346-win32-exception-in-calling-store-procedure-with-limit-as-parameter/#findComment-713695 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.