Anybody got a clue why this isn't deleting? The number is input in the
previous section of code and I know it works correctly, but for some reason
when it gets to here, it just skips to view (apparently), (even if I # out
the Lock lines, so it isn't a lock problem). Am I going about getting the
number into the query in the wrong way? If so, what is the correct manner to
achieve this?
Thanks in advance for your help,
Dawn H
-----CODE BELOW-----
sub delete {
$num=param('delete');
$num=$dbh->quote($num);
GET_LOCK("edit",10)
or bail_out("Cannot get lock, please wait a moment and try again");
$sth = $dbh->prepare("DELETE FROM database WHERE id=$num")
or bail_out("Cannot prepare to be deleted");
$sth->execute()
or bail_out("Cannot delete");
RELEASE_LOCK("edit")
or bail_out("An error occurred when attempting to release lock");
view();
}
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php