What's wrong with mysqli::get_result?












5















I have the following code:



$postId = $_GET['postId'];
$mysqli = new mysqli('localhost', 'username', 'database', 'name_db');
mysqli_report(MYSQLI_REPORT_ALL);

$stmt = $mysqli->stmt_init();
$stmt->prepare("
SELECT *
FROM posts
WHERE postId = ?
");
$stmt->bind_param('i', $postId);
$stmt->execute();
$result = $stmt->get_result();//Call to undefined method
$info = $result->fetch_array(MYSQLI_ASSOC);
echo json_encode($info);


And I get some error marked above. What have i done wrong?



EDIT:



changed fecth_array() to fetch_array()










share|improve this question





























    5















    I have the following code:



    $postId = $_GET['postId'];
    $mysqli = new mysqli('localhost', 'username', 'database', 'name_db');
    mysqli_report(MYSQLI_REPORT_ALL);

    $stmt = $mysqli->stmt_init();
    $stmt->prepare("
    SELECT *
    FROM posts
    WHERE postId = ?
    ");
    $stmt->bind_param('i', $postId);
    $stmt->execute();
    $result = $stmt->get_result();//Call to undefined method
    $info = $result->fetch_array(MYSQLI_ASSOC);
    echo json_encode($info);


    And I get some error marked above. What have i done wrong?



    EDIT:



    changed fecth_array() to fetch_array()










    share|improve this question



























      5












      5








      5








      I have the following code:



      $postId = $_GET['postId'];
      $mysqli = new mysqli('localhost', 'username', 'database', 'name_db');
      mysqli_report(MYSQLI_REPORT_ALL);

      $stmt = $mysqli->stmt_init();
      $stmt->prepare("
      SELECT *
      FROM posts
      WHERE postId = ?
      ");
      $stmt->bind_param('i', $postId);
      $stmt->execute();
      $result = $stmt->get_result();//Call to undefined method
      $info = $result->fetch_array(MYSQLI_ASSOC);
      echo json_encode($info);


      And I get some error marked above. What have i done wrong?



      EDIT:



      changed fecth_array() to fetch_array()










      share|improve this question
















      I have the following code:



      $postId = $_GET['postId'];
      $mysqli = new mysqli('localhost', 'username', 'database', 'name_db');
      mysqli_report(MYSQLI_REPORT_ALL);

      $stmt = $mysqli->stmt_init();
      $stmt->prepare("
      SELECT *
      FROM posts
      WHERE postId = ?
      ");
      $stmt->bind_param('i', $postId);
      $stmt->execute();
      $result = $stmt->get_result();//Call to undefined method
      $info = $result->fetch_array(MYSQLI_ASSOC);
      echo json_encode($info);


      And I get some error marked above. What have i done wrong?



      EDIT:



      changed fecth_array() to fetch_array()







      php mysqli






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 20 '11 at 18:00







      einstein

















      asked Aug 20 '11 at 17:55









      einsteineinstein

      5,758196997




      5,758196997
























          6 Answers
          6






          active

          oldest

          votes


















          15














          As others have stated, it is only available in bleeding edge PHP. You could do something like this (answer to a similar question):



          function bind_array($stmt, &$row) {
          $md = $stmt->result_metadata();
          $params = array();
          while($field = $md->fetch_field()) {
          $params = &$row[$field->name];
          }

          call_user_func_array(array($stmt, 'bind_result'), $params);
          }

          // ....
          bind_array($stmt, $info);
          $stmt->fetch();

          echo json_encode($info);


          Or use mysqli::query if you have a simple query with no parameters - don't use it with dynamically generated SQL-statements.






          share|improve this answer





















          • 10





            Please don't recommend "downgrading" from prepared statements to bogstandard strings. It's hard enough getting people to go the other way.

            – Lightness Races in Orbit
            Aug 20 '11 at 18:22











          • @Tomalak Geret'kal: right - thanks for the reminder, I've added a disclaimer. Not sure if I should remove the reference completely.

            – vstm
            Aug 20 '11 at 18:33











          • I'm not sure either.

            – Lightness Races in Orbit
            Aug 20 '11 at 18:38






          • 1





            It is weird that "downgrading" is the only real option PHP gave us on some situations.

            – Dan
            Oct 8 '13 at 21:58






          • 1





            I tried to use wile stms->fetch() but it's skipping the first record. How can we loop over all result records?

            – Lamar
            Jun 5 '16 at 10:32



















          6














          As mentioned in php documentation mysqli_stmt::get_result, this method is supported since PHP 5.3.0.



          And it is stated in the user notes section that:




          This method requires the mysqlnd driver. Othervise you will get this error: Call to undefined method mysqli_stmt::get_result()







          share|improve this answer































            2














            You're probably using old version of PHP not supporting get_result() as stated on manual page



            (No version information available, might only be in SVN)





            share|improve this answer
























            • This is right. It usually means there's no release with this function in.

              – Lightness Races in Orbit
              Aug 20 '11 at 18:19



















            2














            The manual page doesn't give any clear information on which minimum version of PHP is needed for get_result() to work:




            (No version information available, might only be in SVN)




            I don't know the background to this, but it may simply not be available in your PHP version.



            You could use fetch() instead.






            share|improve this answer
























            • Ok, I thinkt that might be the case. But can I ask how I can get rows in a result set using mysqli and prepared statements?

              – einstein
              Aug 20 '11 at 18:03













            • @Woho see my update

              – Pekka 웃
              Aug 20 '11 at 18:03











            • I don't like using fetch, because I have so much columns. Is there another way?

              – einstein
              Aug 20 '11 at 18:05













            • @Woho fetch_array() for example

              – Pekka 웃
              Aug 20 '11 at 18:07



















            0














            I´m guessing it´s the line below that, change:



            $info = $result->fecth_array(MYSQLI_ASSOC);


            to:



            $info = $result->fetch_array(MYSQLI_ASSOC);





            share|improve this answer
























            • ok changed that. But php issued an error before mysqli::fetch_array();

              – einstein
              Aug 20 '11 at 17:59



















            0














            check to see it your PHP mysql native driver is enable. get->result() only works when mysql native driver is enable. http://www.php.net/manual/en/mysqli-stmt.get-result.php






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f7133575%2fwhats-wrong-with-mysqliget-result%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              6 Answers
              6






              active

              oldest

              votes








              6 Answers
              6






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              15














              As others have stated, it is only available in bleeding edge PHP. You could do something like this (answer to a similar question):



              function bind_array($stmt, &$row) {
              $md = $stmt->result_metadata();
              $params = array();
              while($field = $md->fetch_field()) {
              $params = &$row[$field->name];
              }

              call_user_func_array(array($stmt, 'bind_result'), $params);
              }

              // ....
              bind_array($stmt, $info);
              $stmt->fetch();

              echo json_encode($info);


              Or use mysqli::query if you have a simple query with no parameters - don't use it with dynamically generated SQL-statements.






              share|improve this answer





















              • 10





                Please don't recommend "downgrading" from prepared statements to bogstandard strings. It's hard enough getting people to go the other way.

                – Lightness Races in Orbit
                Aug 20 '11 at 18:22











              • @Tomalak Geret'kal: right - thanks for the reminder, I've added a disclaimer. Not sure if I should remove the reference completely.

                – vstm
                Aug 20 '11 at 18:33











              • I'm not sure either.

                – Lightness Races in Orbit
                Aug 20 '11 at 18:38






              • 1





                It is weird that "downgrading" is the only real option PHP gave us on some situations.

                – Dan
                Oct 8 '13 at 21:58






              • 1





                I tried to use wile stms->fetch() but it's skipping the first record. How can we loop over all result records?

                – Lamar
                Jun 5 '16 at 10:32
















              15














              As others have stated, it is only available in bleeding edge PHP. You could do something like this (answer to a similar question):



              function bind_array($stmt, &$row) {
              $md = $stmt->result_metadata();
              $params = array();
              while($field = $md->fetch_field()) {
              $params = &$row[$field->name];
              }

              call_user_func_array(array($stmt, 'bind_result'), $params);
              }

              // ....
              bind_array($stmt, $info);
              $stmt->fetch();

              echo json_encode($info);


              Or use mysqli::query if you have a simple query with no parameters - don't use it with dynamically generated SQL-statements.






              share|improve this answer





















              • 10





                Please don't recommend "downgrading" from prepared statements to bogstandard strings. It's hard enough getting people to go the other way.

                – Lightness Races in Orbit
                Aug 20 '11 at 18:22











              • @Tomalak Geret'kal: right - thanks for the reminder, I've added a disclaimer. Not sure if I should remove the reference completely.

                – vstm
                Aug 20 '11 at 18:33











              • I'm not sure either.

                – Lightness Races in Orbit
                Aug 20 '11 at 18:38






              • 1





                It is weird that "downgrading" is the only real option PHP gave us on some situations.

                – Dan
                Oct 8 '13 at 21:58






              • 1





                I tried to use wile stms->fetch() but it's skipping the first record. How can we loop over all result records?

                – Lamar
                Jun 5 '16 at 10:32














              15












              15








              15







              As others have stated, it is only available in bleeding edge PHP. You could do something like this (answer to a similar question):



              function bind_array($stmt, &$row) {
              $md = $stmt->result_metadata();
              $params = array();
              while($field = $md->fetch_field()) {
              $params = &$row[$field->name];
              }

              call_user_func_array(array($stmt, 'bind_result'), $params);
              }

              // ....
              bind_array($stmt, $info);
              $stmt->fetch();

              echo json_encode($info);


              Or use mysqli::query if you have a simple query with no parameters - don't use it with dynamically generated SQL-statements.






              share|improve this answer















              As others have stated, it is only available in bleeding edge PHP. You could do something like this (answer to a similar question):



              function bind_array($stmt, &$row) {
              $md = $stmt->result_metadata();
              $params = array();
              while($field = $md->fetch_field()) {
              $params = &$row[$field->name];
              }

              call_user_func_array(array($stmt, 'bind_result'), $params);
              }

              // ....
              bind_array($stmt, $info);
              $stmt->fetch();

              echo json_encode($info);


              Or use mysqli::query if you have a simple query with no parameters - don't use it with dynamically generated SQL-statements.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited May 23 '17 at 11:44









              Community

              11




              11










              answered Aug 20 '11 at 18:08









              vstmvstm

              10.6k13742




              10.6k13742








              • 10





                Please don't recommend "downgrading" from prepared statements to bogstandard strings. It's hard enough getting people to go the other way.

                – Lightness Races in Orbit
                Aug 20 '11 at 18:22











              • @Tomalak Geret'kal: right - thanks for the reminder, I've added a disclaimer. Not sure if I should remove the reference completely.

                – vstm
                Aug 20 '11 at 18:33











              • I'm not sure either.

                – Lightness Races in Orbit
                Aug 20 '11 at 18:38






              • 1





                It is weird that "downgrading" is the only real option PHP gave us on some situations.

                – Dan
                Oct 8 '13 at 21:58






              • 1





                I tried to use wile stms->fetch() but it's skipping the first record. How can we loop over all result records?

                – Lamar
                Jun 5 '16 at 10:32














              • 10





                Please don't recommend "downgrading" from prepared statements to bogstandard strings. It's hard enough getting people to go the other way.

                – Lightness Races in Orbit
                Aug 20 '11 at 18:22











              • @Tomalak Geret'kal: right - thanks for the reminder, I've added a disclaimer. Not sure if I should remove the reference completely.

                – vstm
                Aug 20 '11 at 18:33











              • I'm not sure either.

                – Lightness Races in Orbit
                Aug 20 '11 at 18:38






              • 1





                It is weird that "downgrading" is the only real option PHP gave us on some situations.

                – Dan
                Oct 8 '13 at 21:58






              • 1





                I tried to use wile stms->fetch() but it's skipping the first record. How can we loop over all result records?

                – Lamar
                Jun 5 '16 at 10:32








              10




              10





              Please don't recommend "downgrading" from prepared statements to bogstandard strings. It's hard enough getting people to go the other way.

              – Lightness Races in Orbit
              Aug 20 '11 at 18:22





              Please don't recommend "downgrading" from prepared statements to bogstandard strings. It's hard enough getting people to go the other way.

              – Lightness Races in Orbit
              Aug 20 '11 at 18:22













              @Tomalak Geret'kal: right - thanks for the reminder, I've added a disclaimer. Not sure if I should remove the reference completely.

              – vstm
              Aug 20 '11 at 18:33





              @Tomalak Geret'kal: right - thanks for the reminder, I've added a disclaimer. Not sure if I should remove the reference completely.

              – vstm
              Aug 20 '11 at 18:33













              I'm not sure either.

              – Lightness Races in Orbit
              Aug 20 '11 at 18:38





              I'm not sure either.

              – Lightness Races in Orbit
              Aug 20 '11 at 18:38




              1




              1





              It is weird that "downgrading" is the only real option PHP gave us on some situations.

              – Dan
              Oct 8 '13 at 21:58





              It is weird that "downgrading" is the only real option PHP gave us on some situations.

              – Dan
              Oct 8 '13 at 21:58




              1




              1





              I tried to use wile stms->fetch() but it's skipping the first record. How can we loop over all result records?

              – Lamar
              Jun 5 '16 at 10:32





              I tried to use wile stms->fetch() but it's skipping the first record. How can we loop over all result records?

              – Lamar
              Jun 5 '16 at 10:32













              6














              As mentioned in php documentation mysqli_stmt::get_result, this method is supported since PHP 5.3.0.



              And it is stated in the user notes section that:




              This method requires the mysqlnd driver. Othervise you will get this error: Call to undefined method mysqli_stmt::get_result()







              share|improve this answer




























                6














                As mentioned in php documentation mysqli_stmt::get_result, this method is supported since PHP 5.3.0.



                And it is stated in the user notes section that:




                This method requires the mysqlnd driver. Othervise you will get this error: Call to undefined method mysqli_stmt::get_result()







                share|improve this answer


























                  6












                  6








                  6







                  As mentioned in php documentation mysqli_stmt::get_result, this method is supported since PHP 5.3.0.



                  And it is stated in the user notes section that:




                  This method requires the mysqlnd driver. Othervise you will get this error: Call to undefined method mysqli_stmt::get_result()







                  share|improve this answer













                  As mentioned in php documentation mysqli_stmt::get_result, this method is supported since PHP 5.3.0.



                  And it is stated in the user notes section that:




                  This method requires the mysqlnd driver. Othervise you will get this error: Call to undefined method mysqli_stmt::get_result()








                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 27 '13 at 14:11









                  MohsenmeMohsenme

                  867818




                  867818























                      2














                      You're probably using old version of PHP not supporting get_result() as stated on manual page



                      (No version information available, might only be in SVN)





                      share|improve this answer
























                      • This is right. It usually means there's no release with this function in.

                        – Lightness Races in Orbit
                        Aug 20 '11 at 18:19
















                      2














                      You're probably using old version of PHP not supporting get_result() as stated on manual page



                      (No version information available, might only be in SVN)





                      share|improve this answer
























                      • This is right. It usually means there's no release with this function in.

                        – Lightness Races in Orbit
                        Aug 20 '11 at 18:19














                      2












                      2








                      2







                      You're probably using old version of PHP not supporting get_result() as stated on manual page



                      (No version information available, might only be in SVN)





                      share|improve this answer













                      You're probably using old version of PHP not supporting get_result() as stated on manual page



                      (No version information available, might only be in SVN)






                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Aug 20 '11 at 17:59









                      genesisgenesis

                      43.5k1582111




                      43.5k1582111













                      • This is right. It usually means there's no release with this function in.

                        – Lightness Races in Orbit
                        Aug 20 '11 at 18:19



















                      • This is right. It usually means there's no release with this function in.

                        – Lightness Races in Orbit
                        Aug 20 '11 at 18:19

















                      This is right. It usually means there's no release with this function in.

                      – Lightness Races in Orbit
                      Aug 20 '11 at 18:19





                      This is right. It usually means there's no release with this function in.

                      – Lightness Races in Orbit
                      Aug 20 '11 at 18:19











                      2














                      The manual page doesn't give any clear information on which minimum version of PHP is needed for get_result() to work:




                      (No version information available, might only be in SVN)




                      I don't know the background to this, but it may simply not be available in your PHP version.



                      You could use fetch() instead.






                      share|improve this answer
























                      • Ok, I thinkt that might be the case. But can I ask how I can get rows in a result set using mysqli and prepared statements?

                        – einstein
                        Aug 20 '11 at 18:03













                      • @Woho see my update

                        – Pekka 웃
                        Aug 20 '11 at 18:03











                      • I don't like using fetch, because I have so much columns. Is there another way?

                        – einstein
                        Aug 20 '11 at 18:05













                      • @Woho fetch_array() for example

                        – Pekka 웃
                        Aug 20 '11 at 18:07
















                      2














                      The manual page doesn't give any clear information on which minimum version of PHP is needed for get_result() to work:




                      (No version information available, might only be in SVN)




                      I don't know the background to this, but it may simply not be available in your PHP version.



                      You could use fetch() instead.






                      share|improve this answer
























                      • Ok, I thinkt that might be the case. But can I ask how I can get rows in a result set using mysqli and prepared statements?

                        – einstein
                        Aug 20 '11 at 18:03













                      • @Woho see my update

                        – Pekka 웃
                        Aug 20 '11 at 18:03











                      • I don't like using fetch, because I have so much columns. Is there another way?

                        – einstein
                        Aug 20 '11 at 18:05













                      • @Woho fetch_array() for example

                        – Pekka 웃
                        Aug 20 '11 at 18:07














                      2












                      2








                      2







                      The manual page doesn't give any clear information on which minimum version of PHP is needed for get_result() to work:




                      (No version information available, might only be in SVN)




                      I don't know the background to this, but it may simply not be available in your PHP version.



                      You could use fetch() instead.






                      share|improve this answer













                      The manual page doesn't give any clear information on which minimum version of PHP is needed for get_result() to work:




                      (No version information available, might only be in SVN)




                      I don't know the background to this, but it may simply not be available in your PHP version.



                      You could use fetch() instead.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Aug 20 '11 at 18:01









                      Pekka 웃Pekka 웃

                      357k1178421013




                      357k1178421013













                      • Ok, I thinkt that might be the case. But can I ask how I can get rows in a result set using mysqli and prepared statements?

                        – einstein
                        Aug 20 '11 at 18:03













                      • @Woho see my update

                        – Pekka 웃
                        Aug 20 '11 at 18:03











                      • I don't like using fetch, because I have so much columns. Is there another way?

                        – einstein
                        Aug 20 '11 at 18:05













                      • @Woho fetch_array() for example

                        – Pekka 웃
                        Aug 20 '11 at 18:07



















                      • Ok, I thinkt that might be the case. But can I ask how I can get rows in a result set using mysqli and prepared statements?

                        – einstein
                        Aug 20 '11 at 18:03













                      • @Woho see my update

                        – Pekka 웃
                        Aug 20 '11 at 18:03











                      • I don't like using fetch, because I have so much columns. Is there another way?

                        – einstein
                        Aug 20 '11 at 18:05













                      • @Woho fetch_array() for example

                        – Pekka 웃
                        Aug 20 '11 at 18:07

















                      Ok, I thinkt that might be the case. But can I ask how I can get rows in a result set using mysqli and prepared statements?

                      – einstein
                      Aug 20 '11 at 18:03







                      Ok, I thinkt that might be the case. But can I ask how I can get rows in a result set using mysqli and prepared statements?

                      – einstein
                      Aug 20 '11 at 18:03















                      @Woho see my update

                      – Pekka 웃
                      Aug 20 '11 at 18:03





                      @Woho see my update

                      – Pekka 웃
                      Aug 20 '11 at 18:03













                      I don't like using fetch, because I have so much columns. Is there another way?

                      – einstein
                      Aug 20 '11 at 18:05







                      I don't like using fetch, because I have so much columns. Is there another way?

                      – einstein
                      Aug 20 '11 at 18:05















                      @Woho fetch_array() for example

                      – Pekka 웃
                      Aug 20 '11 at 18:07





                      @Woho fetch_array() for example

                      – Pekka 웃
                      Aug 20 '11 at 18:07











                      0














                      I´m guessing it´s the line below that, change:



                      $info = $result->fecth_array(MYSQLI_ASSOC);


                      to:



                      $info = $result->fetch_array(MYSQLI_ASSOC);





                      share|improve this answer
























                      • ok changed that. But php issued an error before mysqli::fetch_array();

                        – einstein
                        Aug 20 '11 at 17:59
















                      0














                      I´m guessing it´s the line below that, change:



                      $info = $result->fecth_array(MYSQLI_ASSOC);


                      to:



                      $info = $result->fetch_array(MYSQLI_ASSOC);





                      share|improve this answer
























                      • ok changed that. But php issued an error before mysqli::fetch_array();

                        – einstein
                        Aug 20 '11 at 17:59














                      0












                      0








                      0







                      I´m guessing it´s the line below that, change:



                      $info = $result->fecth_array(MYSQLI_ASSOC);


                      to:



                      $info = $result->fetch_array(MYSQLI_ASSOC);





                      share|improve this answer













                      I´m guessing it´s the line below that, change:



                      $info = $result->fecth_array(MYSQLI_ASSOC);


                      to:



                      $info = $result->fetch_array(MYSQLI_ASSOC);






                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Aug 20 '11 at 17:57









                      jeroenjeroen

                      82.3k1699123




                      82.3k1699123













                      • ok changed that. But php issued an error before mysqli::fetch_array();

                        – einstein
                        Aug 20 '11 at 17:59



















                      • ok changed that. But php issued an error before mysqli::fetch_array();

                        – einstein
                        Aug 20 '11 at 17:59

















                      ok changed that. But php issued an error before mysqli::fetch_array();

                      – einstein
                      Aug 20 '11 at 17:59





                      ok changed that. But php issued an error before mysqli::fetch_array();

                      – einstein
                      Aug 20 '11 at 17:59











                      0














                      check to see it your PHP mysql native driver is enable. get->result() only works when mysql native driver is enable. http://www.php.net/manual/en/mysqli-stmt.get-result.php






                      share|improve this answer




























                        0














                        check to see it your PHP mysql native driver is enable. get->result() only works when mysql native driver is enable. http://www.php.net/manual/en/mysqli-stmt.get-result.php






                        share|improve this answer


























                          0












                          0








                          0







                          check to see it your PHP mysql native driver is enable. get->result() only works when mysql native driver is enable. http://www.php.net/manual/en/mysqli-stmt.get-result.php






                          share|improve this answer













                          check to see it your PHP mysql native driver is enable. get->result() only works when mysql native driver is enable. http://www.php.net/manual/en/mysqli-stmt.get-result.php







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jul 6 '14 at 16:21









                          IfetayoIfetayo

                          3315




                          3315






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f7133575%2fwhats-wrong-with-mysqliget-result%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Mossoró

                              Error while reading .h5 file using the rhdf5 package in R

                              Pushsharp Apns notification error: 'InvalidToken'