Run multiple MySQL queries from PHP | Why is this not working?

前端 未结 2 521
Happy的楠姐
Happy的楠姐 2021-01-22 06:32

I am trying to run multiple queries on some mysql dbs from a php file. However it is not working. Can anyone point out where I am going wrong?

Here is the contents of th

2条回答
  •  抹茶落季
    2021-01-22 07:12

    The most important thing to do in such a case is debugging:

    • Remove the @ prefix to see errors
    • Add a echo mysql_error() if mysql_query() returns false to see mySQL's error messages

    in your specific case, mysql_query() is not able to execute more than one statement. The easiest solution is to use two separate commands.

提交回复
热议问题