php - My stored procedure works fine when I test it but returns nothing PDO -



php - My stored procedure works fine when I test it but returns nothing PDO -

set @req =concat('select name, id',ptype,' ',ptype); if ptype = "country" set @req = concat(@req,' idcontinent=',psurtypeid); elseif ptype="state" set @req = concat(@req,' idcountry=',psurtypeid); elseif ptype="area" set @req = concat(@req,' idstate=',psurtypeid); end if; prepare stmt @req; execute stmt; deallocate prepare stmt;

and php code

$strreq = "call afficherlocationlist('$subtype'," . $result["id"] . ")"; $req = $bd->prepare($strreq); $req->execute(); $arrayoptions = $req->fetchall(pdo::fetch_assoc);

when debug , resulting query looks call afficherlocationlist('state',1) , works fine both in mysql workbench , php myadmin returns empty array in code...

php mysql stored-procedures pdo

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -