PHP + PDO - Inserting data on the table with a loop











up vote
1
down vote

favorite












First of all i made a simple code to insert data on my table, with the information from this code i made a loop to insert data on another table for a notification system.



I'm new to PHP and i think that this query that is being executed into a loop is really poor in performance, example: if i have like 100K users, this query will be executed 100K times... But the query will be executed 100K times at same time or is it going to run one after the other? I don't think so, because it's a loop, right? But i still think that my loop is poor in performance, i want to know how much and how can i improve it.



Anyways, what you guys think about my code?



More details is on the comments into the code bellow:



$slug = '';

if(isset($_POST["create"])){

$slug = preg_replace('/[^a-z0-9]+/i', '-', trim(strtolower($_POST["itemName"])));
$query = "SELECT `slug_url` FROM `table_tudo` WHERE `slug_url` LIKE ?";
$statement = $conn->prepare($query);
$statement->execute(["$slug%"]);
$total_row = $statement->rowCount();
$result = $statement->fetchAll();

$data = $statement->fetchAll(PDO::FETCH_COLUMN);

if(in_array($slug, $data)){
$count = 0;
while( in_array( ($slug . '-' . ++$count ), $data) );
$slug = $slug . '-' . $count;
}

$insert_data = array(

':title' => $_POST['itemName'],
':epTitle' => $_POST['epTitle'],
':itemName' => $_POST['itemName'],
':data' => $_POST['data'],
':datePublished' => $_POST['datePublished'],
':dateModified' => $_POST['datePublished'],
':descricao' => $_POST['itemName'].' - Tipo '.$_POST['epNum'].' - '.$_POST['descricao'],
':epCapa' => $_POST['epCapa'],
':alt' => $_POST['itemName'].' - Tipo '.$_POST['epNum'].' - '.$_POST['epTitle'],
':audio' => $_POST['audio'],
':qualidade' => $_POST['qualidade'],
':epNum' => $_POST['epNum'],
':tipo' => 'ep',
':keywords' => $_POST['keywords'],
':slugForitemPage' => $slug,
':player_SD' => $_POST['player_SD'],
':player_HD' => $_POST['player_HD'],
':slug_url' => "https://example.com/index.php?page=".$slug.'&ep='.$_POST['epNum'],
':slug_link' => $_POST['slug_link'],
':entry_type' => 'item'

);

$query = "INSERT INTO table_tudo (title, epTitle, itemName, data, dataFL, datePublished, dateModified, descricao, epCapa, alt, audio, qualidade, epNum, tipo, keywords, slugForitemPage, player_SD, player_HD, slug_url, slug_link, entry_type) VALUES (:title, :epTitle, :itemName, :data, NOW(), :datePublished, :dateModified, :descricao, :epCapa, :alt, :audio, :qualidade, :epNum, :tipo, :keywords, :slugForitemPage, :player_SD, :player_HD, :slug_url, :slug_link, :entry_type)";
$statement = $conn->prepare($query);
$statement->execute($insert_data);

// this is used on the INSERT query bellow
$epNum = $_POST['epNum'];
$itemName = $_POST['itemName'];
$status = 'unread';
//

// here i made a query to get all user_id where itemName is = to $_POST['itemName'];, this information
// is on a table called `seguiritem`, i will know it by the $_POST['itemName'], that is get when i execute the INSERT query above
$checkUserFLW = $conn->prepare("SELECT `user_id`, `itemName` FROM seguiritem WHERE itemName = :itemName");
$checkUserFLW->bindParam(':itemName', $itemName, PDO::PARAM_STR);
$checkUserFLW->execute();
$resultRow = $checkUserFLW->rowCount();

// if the name of the item is on the table, this will execute the code inside this condition
if($resultRow = 1){

// i have a table called `noti`, on this table i store the (user_id, epNum, itemName, status), this is
// a table that i retrive data to a notification system(i think it's not relevant to my question, but
// if you think so, place a comment bellow), on the above query i selected all the `user_id` that is
// on the table `siguiritem`, with this information i made a loop
foreach($checkUserFLW as $ckUsFLW){

//for each user_id that have the column `itemName` equal to
// $_POST['itemName'] on the table `seguiritem`, will execute this
// query to insert on the table `noti` the `user_id`, `itemName`,
// `epNum`(this is like a identifier), and `status` that will
// be = `unread`.
$user_id = $ckUsFLW['user_id'];
$queryISNOTI = $conn->prepare("INSERT INTO noti (user_id, epNum, itemName, status) VALUES (:user_id, :epNum, :itemName, :status)");
$queryISNOTI->bindParam(':user_id', $user_id, PDO::PARAM_INT);
$queryISNOTI->bindParam(':epNum', $epNum, PDO::PARAM_INT);
$queryISNOTI->bindParam(':itemName', $itemName, PDO::PARAM_STR);
$queryISNOTI->bindParam(':status', $status, PDO::PARAM_STR);
$queryISNOTI->execute();
}

}

}


I'm not sure if i explained it well, please any doubts just ask me.










share|improve this question









New contributor




515948453225 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    1
    down vote

    favorite












    First of all i made a simple code to insert data on my table, with the information from this code i made a loop to insert data on another table for a notification system.



    I'm new to PHP and i think that this query that is being executed into a loop is really poor in performance, example: if i have like 100K users, this query will be executed 100K times... But the query will be executed 100K times at same time or is it going to run one after the other? I don't think so, because it's a loop, right? But i still think that my loop is poor in performance, i want to know how much and how can i improve it.



    Anyways, what you guys think about my code?



    More details is on the comments into the code bellow:



    $slug = '';

    if(isset($_POST["create"])){

    $slug = preg_replace('/[^a-z0-9]+/i', '-', trim(strtolower($_POST["itemName"])));
    $query = "SELECT `slug_url` FROM `table_tudo` WHERE `slug_url` LIKE ?";
    $statement = $conn->prepare($query);
    $statement->execute(["$slug%"]);
    $total_row = $statement->rowCount();
    $result = $statement->fetchAll();

    $data = $statement->fetchAll(PDO::FETCH_COLUMN);

    if(in_array($slug, $data)){
    $count = 0;
    while( in_array( ($slug . '-' . ++$count ), $data) );
    $slug = $slug . '-' . $count;
    }

    $insert_data = array(

    ':title' => $_POST['itemName'],
    ':epTitle' => $_POST['epTitle'],
    ':itemName' => $_POST['itemName'],
    ':data' => $_POST['data'],
    ':datePublished' => $_POST['datePublished'],
    ':dateModified' => $_POST['datePublished'],
    ':descricao' => $_POST['itemName'].' - Tipo '.$_POST['epNum'].' - '.$_POST['descricao'],
    ':epCapa' => $_POST['epCapa'],
    ':alt' => $_POST['itemName'].' - Tipo '.$_POST['epNum'].' - '.$_POST['epTitle'],
    ':audio' => $_POST['audio'],
    ':qualidade' => $_POST['qualidade'],
    ':epNum' => $_POST['epNum'],
    ':tipo' => 'ep',
    ':keywords' => $_POST['keywords'],
    ':slugForitemPage' => $slug,
    ':player_SD' => $_POST['player_SD'],
    ':player_HD' => $_POST['player_HD'],
    ':slug_url' => "https://example.com/index.php?page=".$slug.'&ep='.$_POST['epNum'],
    ':slug_link' => $_POST['slug_link'],
    ':entry_type' => 'item'

    );

    $query = "INSERT INTO table_tudo (title, epTitle, itemName, data, dataFL, datePublished, dateModified, descricao, epCapa, alt, audio, qualidade, epNum, tipo, keywords, slugForitemPage, player_SD, player_HD, slug_url, slug_link, entry_type) VALUES (:title, :epTitle, :itemName, :data, NOW(), :datePublished, :dateModified, :descricao, :epCapa, :alt, :audio, :qualidade, :epNum, :tipo, :keywords, :slugForitemPage, :player_SD, :player_HD, :slug_url, :slug_link, :entry_type)";
    $statement = $conn->prepare($query);
    $statement->execute($insert_data);

    // this is used on the INSERT query bellow
    $epNum = $_POST['epNum'];
    $itemName = $_POST['itemName'];
    $status = 'unread';
    //

    // here i made a query to get all user_id where itemName is = to $_POST['itemName'];, this information
    // is on a table called `seguiritem`, i will know it by the $_POST['itemName'], that is get when i execute the INSERT query above
    $checkUserFLW = $conn->prepare("SELECT `user_id`, `itemName` FROM seguiritem WHERE itemName = :itemName");
    $checkUserFLW->bindParam(':itemName', $itemName, PDO::PARAM_STR);
    $checkUserFLW->execute();
    $resultRow = $checkUserFLW->rowCount();

    // if the name of the item is on the table, this will execute the code inside this condition
    if($resultRow = 1){

    // i have a table called `noti`, on this table i store the (user_id, epNum, itemName, status), this is
    // a table that i retrive data to a notification system(i think it's not relevant to my question, but
    // if you think so, place a comment bellow), on the above query i selected all the `user_id` that is
    // on the table `siguiritem`, with this information i made a loop
    foreach($checkUserFLW as $ckUsFLW){

    //for each user_id that have the column `itemName` equal to
    // $_POST['itemName'] on the table `seguiritem`, will execute this
    // query to insert on the table `noti` the `user_id`, `itemName`,
    // `epNum`(this is like a identifier), and `status` that will
    // be = `unread`.
    $user_id = $ckUsFLW['user_id'];
    $queryISNOTI = $conn->prepare("INSERT INTO noti (user_id, epNum, itemName, status) VALUES (:user_id, :epNum, :itemName, :status)");
    $queryISNOTI->bindParam(':user_id', $user_id, PDO::PARAM_INT);
    $queryISNOTI->bindParam(':epNum', $epNum, PDO::PARAM_INT);
    $queryISNOTI->bindParam(':itemName', $itemName, PDO::PARAM_STR);
    $queryISNOTI->bindParam(':status', $status, PDO::PARAM_STR);
    $queryISNOTI->execute();
    }

    }

    }


    I'm not sure if i explained it well, please any doubts just ask me.










    share|improve this question









    New contributor




    515948453225 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      First of all i made a simple code to insert data on my table, with the information from this code i made a loop to insert data on another table for a notification system.



      I'm new to PHP and i think that this query that is being executed into a loop is really poor in performance, example: if i have like 100K users, this query will be executed 100K times... But the query will be executed 100K times at same time or is it going to run one after the other? I don't think so, because it's a loop, right? But i still think that my loop is poor in performance, i want to know how much and how can i improve it.



      Anyways, what you guys think about my code?



      More details is on the comments into the code bellow:



      $slug = '';

      if(isset($_POST["create"])){

      $slug = preg_replace('/[^a-z0-9]+/i', '-', trim(strtolower($_POST["itemName"])));
      $query = "SELECT `slug_url` FROM `table_tudo` WHERE `slug_url` LIKE ?";
      $statement = $conn->prepare($query);
      $statement->execute(["$slug%"]);
      $total_row = $statement->rowCount();
      $result = $statement->fetchAll();

      $data = $statement->fetchAll(PDO::FETCH_COLUMN);

      if(in_array($slug, $data)){
      $count = 0;
      while( in_array( ($slug . '-' . ++$count ), $data) );
      $slug = $slug . '-' . $count;
      }

      $insert_data = array(

      ':title' => $_POST['itemName'],
      ':epTitle' => $_POST['epTitle'],
      ':itemName' => $_POST['itemName'],
      ':data' => $_POST['data'],
      ':datePublished' => $_POST['datePublished'],
      ':dateModified' => $_POST['datePublished'],
      ':descricao' => $_POST['itemName'].' - Tipo '.$_POST['epNum'].' - '.$_POST['descricao'],
      ':epCapa' => $_POST['epCapa'],
      ':alt' => $_POST['itemName'].' - Tipo '.$_POST['epNum'].' - '.$_POST['epTitle'],
      ':audio' => $_POST['audio'],
      ':qualidade' => $_POST['qualidade'],
      ':epNum' => $_POST['epNum'],
      ':tipo' => 'ep',
      ':keywords' => $_POST['keywords'],
      ':slugForitemPage' => $slug,
      ':player_SD' => $_POST['player_SD'],
      ':player_HD' => $_POST['player_HD'],
      ':slug_url' => "https://example.com/index.php?page=".$slug.'&ep='.$_POST['epNum'],
      ':slug_link' => $_POST['slug_link'],
      ':entry_type' => 'item'

      );

      $query = "INSERT INTO table_tudo (title, epTitle, itemName, data, dataFL, datePublished, dateModified, descricao, epCapa, alt, audio, qualidade, epNum, tipo, keywords, slugForitemPage, player_SD, player_HD, slug_url, slug_link, entry_type) VALUES (:title, :epTitle, :itemName, :data, NOW(), :datePublished, :dateModified, :descricao, :epCapa, :alt, :audio, :qualidade, :epNum, :tipo, :keywords, :slugForitemPage, :player_SD, :player_HD, :slug_url, :slug_link, :entry_type)";
      $statement = $conn->prepare($query);
      $statement->execute($insert_data);

      // this is used on the INSERT query bellow
      $epNum = $_POST['epNum'];
      $itemName = $_POST['itemName'];
      $status = 'unread';
      //

      // here i made a query to get all user_id where itemName is = to $_POST['itemName'];, this information
      // is on a table called `seguiritem`, i will know it by the $_POST['itemName'], that is get when i execute the INSERT query above
      $checkUserFLW = $conn->prepare("SELECT `user_id`, `itemName` FROM seguiritem WHERE itemName = :itemName");
      $checkUserFLW->bindParam(':itemName', $itemName, PDO::PARAM_STR);
      $checkUserFLW->execute();
      $resultRow = $checkUserFLW->rowCount();

      // if the name of the item is on the table, this will execute the code inside this condition
      if($resultRow = 1){

      // i have a table called `noti`, on this table i store the (user_id, epNum, itemName, status), this is
      // a table that i retrive data to a notification system(i think it's not relevant to my question, but
      // if you think so, place a comment bellow), on the above query i selected all the `user_id` that is
      // on the table `siguiritem`, with this information i made a loop
      foreach($checkUserFLW as $ckUsFLW){

      //for each user_id that have the column `itemName` equal to
      // $_POST['itemName'] on the table `seguiritem`, will execute this
      // query to insert on the table `noti` the `user_id`, `itemName`,
      // `epNum`(this is like a identifier), and `status` that will
      // be = `unread`.
      $user_id = $ckUsFLW['user_id'];
      $queryISNOTI = $conn->prepare("INSERT INTO noti (user_id, epNum, itemName, status) VALUES (:user_id, :epNum, :itemName, :status)");
      $queryISNOTI->bindParam(':user_id', $user_id, PDO::PARAM_INT);
      $queryISNOTI->bindParam(':epNum', $epNum, PDO::PARAM_INT);
      $queryISNOTI->bindParam(':itemName', $itemName, PDO::PARAM_STR);
      $queryISNOTI->bindParam(':status', $status, PDO::PARAM_STR);
      $queryISNOTI->execute();
      }

      }

      }


      I'm not sure if i explained it well, please any doubts just ask me.










      share|improve this question









      New contributor




      515948453225 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      First of all i made a simple code to insert data on my table, with the information from this code i made a loop to insert data on another table for a notification system.



      I'm new to PHP and i think that this query that is being executed into a loop is really poor in performance, example: if i have like 100K users, this query will be executed 100K times... But the query will be executed 100K times at same time or is it going to run one after the other? I don't think so, because it's a loop, right? But i still think that my loop is poor in performance, i want to know how much and how can i improve it.



      Anyways, what you guys think about my code?



      More details is on the comments into the code bellow:



      $slug = '';

      if(isset($_POST["create"])){

      $slug = preg_replace('/[^a-z0-9]+/i', '-', trim(strtolower($_POST["itemName"])));
      $query = "SELECT `slug_url` FROM `table_tudo` WHERE `slug_url` LIKE ?";
      $statement = $conn->prepare($query);
      $statement->execute(["$slug%"]);
      $total_row = $statement->rowCount();
      $result = $statement->fetchAll();

      $data = $statement->fetchAll(PDO::FETCH_COLUMN);

      if(in_array($slug, $data)){
      $count = 0;
      while( in_array( ($slug . '-' . ++$count ), $data) );
      $slug = $slug . '-' . $count;
      }

      $insert_data = array(

      ':title' => $_POST['itemName'],
      ':epTitle' => $_POST['epTitle'],
      ':itemName' => $_POST['itemName'],
      ':data' => $_POST['data'],
      ':datePublished' => $_POST['datePublished'],
      ':dateModified' => $_POST['datePublished'],
      ':descricao' => $_POST['itemName'].' - Tipo '.$_POST['epNum'].' - '.$_POST['descricao'],
      ':epCapa' => $_POST['epCapa'],
      ':alt' => $_POST['itemName'].' - Tipo '.$_POST['epNum'].' - '.$_POST['epTitle'],
      ':audio' => $_POST['audio'],
      ':qualidade' => $_POST['qualidade'],
      ':epNum' => $_POST['epNum'],
      ':tipo' => 'ep',
      ':keywords' => $_POST['keywords'],
      ':slugForitemPage' => $slug,
      ':player_SD' => $_POST['player_SD'],
      ':player_HD' => $_POST['player_HD'],
      ':slug_url' => "https://example.com/index.php?page=".$slug.'&ep='.$_POST['epNum'],
      ':slug_link' => $_POST['slug_link'],
      ':entry_type' => 'item'

      );

      $query = "INSERT INTO table_tudo (title, epTitle, itemName, data, dataFL, datePublished, dateModified, descricao, epCapa, alt, audio, qualidade, epNum, tipo, keywords, slugForitemPage, player_SD, player_HD, slug_url, slug_link, entry_type) VALUES (:title, :epTitle, :itemName, :data, NOW(), :datePublished, :dateModified, :descricao, :epCapa, :alt, :audio, :qualidade, :epNum, :tipo, :keywords, :slugForitemPage, :player_SD, :player_HD, :slug_url, :slug_link, :entry_type)";
      $statement = $conn->prepare($query);
      $statement->execute($insert_data);

      // this is used on the INSERT query bellow
      $epNum = $_POST['epNum'];
      $itemName = $_POST['itemName'];
      $status = 'unread';
      //

      // here i made a query to get all user_id where itemName is = to $_POST['itemName'];, this information
      // is on a table called `seguiritem`, i will know it by the $_POST['itemName'], that is get when i execute the INSERT query above
      $checkUserFLW = $conn->prepare("SELECT `user_id`, `itemName` FROM seguiritem WHERE itemName = :itemName");
      $checkUserFLW->bindParam(':itemName', $itemName, PDO::PARAM_STR);
      $checkUserFLW->execute();
      $resultRow = $checkUserFLW->rowCount();

      // if the name of the item is on the table, this will execute the code inside this condition
      if($resultRow = 1){

      // i have a table called `noti`, on this table i store the (user_id, epNum, itemName, status), this is
      // a table that i retrive data to a notification system(i think it's not relevant to my question, but
      // if you think so, place a comment bellow), on the above query i selected all the `user_id` that is
      // on the table `siguiritem`, with this information i made a loop
      foreach($checkUserFLW as $ckUsFLW){

      //for each user_id that have the column `itemName` equal to
      // $_POST['itemName'] on the table `seguiritem`, will execute this
      // query to insert on the table `noti` the `user_id`, `itemName`,
      // `epNum`(this is like a identifier), and `status` that will
      // be = `unread`.
      $user_id = $ckUsFLW['user_id'];
      $queryISNOTI = $conn->prepare("INSERT INTO noti (user_id, epNum, itemName, status) VALUES (:user_id, :epNum, :itemName, :status)");
      $queryISNOTI->bindParam(':user_id', $user_id, PDO::PARAM_INT);
      $queryISNOTI->bindParam(':epNum', $epNum, PDO::PARAM_INT);
      $queryISNOTI->bindParam(':itemName', $itemName, PDO::PARAM_STR);
      $queryISNOTI->bindParam(':status', $status, PDO::PARAM_STR);
      $queryISNOTI->execute();
      }

      }

      }


      I'm not sure if i explained it well, please any doubts just ask me.







      performance beginner php sql pdo






      share|improve this question









      New contributor




      515948453225 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      515948453225 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 19 mins ago





















      New contributor




      515948453225 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 11 hours ago









      515948453225

      113




      113




      New contributor




      515948453225 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      515948453225 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      515948453225 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



























          active

          oldest

          votes











          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
          });
          });
          }, "mathjax-editing");

          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: "196"
          };
          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',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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
          });


          }
          });






          515948453225 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f208829%2fphp-pdo-inserting-data-on-the-table-with-a-loop%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          515948453225 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          515948453225 is a new contributor. Be nice, and check out our Code of Conduct.













          515948453225 is a new contributor. Be nice, and check out our Code of Conduct.












          515948453225 is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Code Review Stack Exchange!


          • 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.


          Use MathJax to format equations. MathJax reference.


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





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2fcodereview.stackexchange.com%2fquestions%2f208829%2fphp-pdo-inserting-data-on-the-table-with-a-loop%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

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          TypeError: fit_transform() missing 1 required positional argument: 'X'