How to do multiple queries to SQL

前端 未结 2 558
醉话见心
醉话见心 2021-01-29 06:06

I am trying to create a table and , insert some values in database with help of PHP script. While inserting only 1 row , it works fine. An when I try to enter more number of row

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-29 06:51

    Use mysqli_multi_query instead of mysqli_query, that should do it.

    $query = mysqli_multi_query($db_conx,$sqlCommand) or die(mysqli_error($db_conx));
    

    http://php.net/manual/en/mysqli.multi-query.php

提交回复
热议问题