mysqli_query(): Couldn't fetch mysqli error

前端 未结 1 629
忘掉有多难
忘掉有多难 2020-11-27 23:21

I am receiving a \"Couldn\'t fetch mysqli\" error on the following function when trying to import data from a text file. However the insert function is working just fine in

相关标签:
1条回答
  • 2020-11-28 00:02

    I suspect you're calling the function multiple times. But it calls mysqli_close($conn) at the end, so when you try to use it the next time you get an error, because $conn can't be used any more.

    Get rid of that line, and close the connection when the script is all done using MySQL (or don't bother, it will be closed automatically when the script ends).

    0 讨论(0)
提交回复
热议问题