Delete
Ask for advice on native PHP PDO deleting a record has been unsuccessful. I don’t know where the mistake is. I have been troubled for a long time. Please give me some advice.
You need to delete a piece of data through GET,
exec($sql); print("Deleted $count rows.\n"); } ?>
The result is wrong, the error message is:
Fatal error: Uncaught Error: Call to a member function exec() on null in D:\phpstudy_pro\WWW\admin\cmd. php:32 Stack trace: #0 D:\phpstudy_pro\WWW\admin\cmd.php(22): delInfo() #1 {main} thrown in D:\phpstudy_pro\WWW\admin\cmd.php on line 32
The id here is an input error. Normally it should be tid. The problem is not here. After the interruption, the sql is normal. DELETE From link where id=69 The database has this record.