How to check if a MySQL query using the legacy API was successful?

前端 未结 6 1948
栀梦
栀梦 2020-12-01 13:48

How do I check if a MySQL query is successful other than using die()

I\'m trying to achieve...

mysql_query($query);

if(success){
//move         


        
6条回答
  •  眼角桃花
    2020-12-01 14:40

    if using MySQLi bind_param try to put this line above the query

    mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
    

提交回复
热议问题