Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Databases _ DELETE not working in database

Posted by: tudsy Sep 20 2017, 07:40 AM


I have solved error 1044. In my script, I have the following lines:

$sth = prepare('DELETE FROM subscribers WHERE emailaddress = :Email');

$sth -> bindValue(':Email', "%{$Email}%");
$sth -> execute();

When I execute the above there is no error but the record is still in the database!

Can anyone help?


Adrian :shades: Attached File  Unsubscribe.php ( 1.56k ) Number of downloads: 1350
Attached File  unsubscribe1.php ( 2.03k ) Number of downloads: 1384
Attached File  Sorrytoseeyougo.html ( 1.02k ) Number of downloads: 1316
Attached Image

Posted by: tudsy Sep 21 2017, 01:14 AM


It works now!!!

I removed the quotes and % sign when I am binding the value.


Posted by: CharlesEF Sep 21 2017, 11:40 AM

The curly braces({}) are fine but I have no idea what the percent sign (%) is or even if it applies to PHP.

Powered by Invision Power Board (
© Invision Power Services (