Note that there are some explanatory texts on larger screens.

plurals
  1. POMysqli statement execute error : Result consisted of more than one row
    text
    copied!<p>I am fetching the three values from TUsers using select query where I am getting the error as </p> <p>Mysqli statement execute error : Result consisted of more than one row.</p> <p>I have used DISTINCTROW for avoiding duplication and I am using Zend framework to call the procedure.</p> <p>Here is the code:</p> <p>Procedure:</p> <pre><code> CREATE DEFINER=`root`@`` PROCEDURE `spfetchloginid`(in securityans varchar(50),out email varchar(50),out loginidout varchar(50),out useridout varchar(50)) BEGIN SELECT DISTINCTROW Email,login_id,user_id into email,loginidout,useridout FROM DB.TUsers where SecurityAns=securityans ; END </code></pre> <p>Calling the Procedure in ZendFramework from Controller:</p> <pre><code> $db=Zend_Db_Table::getDefaultAdapter(); $spParams = array(1,'NewValue'); $stmt = $db-&gt;query("CALL spfetchloginid('$securityans',@email,@loginidout,@useridout)"); print_r($stmt-&gt;fetchAll()); $stmt-&gt;closeCursor(); $stmtresult10=$db-&gt;query("select @email"); $email_to=$stmtresult10-&gt;fetch(); $stmtresult10-&gt;closeCursor(); $Emails=$email_to["@email"]; echo $Emails; $stmtresult11=$db-&gt;query("select @loginidout"); $loginid=$stmtresult11-&gt;fetch(); $stmtresult11-&gt;closeCursor(); $loginids=$loginid["@loginidout"]; echo $loginids; $stmtresult12=$db-&gt;query("select @useridout"); $userid=$stmtresult12-&gt;fetch(); $stmtresult12-&gt;closeCursor(); $userids=$userid["@useridout"]; echo $userids; </code></pre> <p>Please tell me any good suggestions when using Zend and My Sql for calling the procedures. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload