RE: [PHP] Why won`t this delete?
| From: | Don Read | Date: | Fri, 27 Oct 2000 20:22:19 +0000 |
| Subject: | RE: [PHP] Why won`t this delete? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22374@lists.php.net to get a copy of this message | ||
On 27-Oct-00 Website4S@aol.com wrote:
> Hi,
>
> I have a basic if statement but for some reason it just won`t delete, any
> ideas what I`ve done wrong? I have a table called EList1 which has one field
> called Email varchar(50) I know the form is working ok because it allows me
> to add but not remove.
>
> if ($Selection=="unsubscribe"){
>
> $Updstmt="delete from EList1 where Email=\"$Email\"";
>
> $SQLConn = mysql_connect("", "", "") or die ("Could not
> connect to
> database");
> $db = mysql_select_db("f199102", $SQLConn) or die ("Couldn`t select
> database");
// while (! $code_working )
// read_the_manual();
>
> $query_delete=mysql_db_query($db, $Updstmt);
>
> if (!$query_delete){
> echo "Couldn`t Delete";
echo "<B>Because " .mysql_error() ."<BR>";
echo "when i attemped :" .$Updstmt ."</B><P>";
> }
>
Regards,
--
Don Read dread@texas.net
There are old sailors, and there are foolish
sailors; but damn few old foolish sailors.
---------------------------------------------