Help - Search - Members - Calendar
Full Version: DELETE not working in database
HTMLHelp Forums > Programming > Databases
tudsy
Hi

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?


Thanks.

Adrian :shades: Click to view attachmentClick to view attachmentClick to view attachmentClick to view attachment
tudsy
Hi

It works now!!!

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

Thanks.
CharlesEF
The curly braces({}) are fine but I have no idea what the percent sign (%) is or even if it applies to PHP.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.