in reply to How do I delete a string from my database and update it.

The question is vague. It sounds like you want to delete some record from the database. One way to do this would be:

$dbh->do("delete from table_1 where some_id = 1234");

...or if you want to NULL one of the attributes for a record you could:

$dbh->do("update some_table set some_value=NULL where some_id = 1234") +;

...and then call $dbh->commit if AutoCommit is not set, but again the question is really too vague to answer.

Replies are listed 'Best First'.
Re: Answer: How do I delete a string from my database and update it.
by exussum0 (Vicar) on Dec 20, 2003 at 20:55 UTC
    Using placec holders might be a little smarter.

    $sth = $dbh->prepare("delete from table_1 where some_id = ?"); $sth->execute(1234); $sth->execute(undef);

    Less worry about quotes.


    Play that funky music white boy..