Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: deleting from a mysql database

by mpolo (Chaplain)
on Jan 06, 2004 at 14:05 UTC ( #319119=note: print w/replies, xml ) Need Help??

in reply to deleting from a mysql database

Not really an answer to your question, but you don't need to escape (backslash) the quotation marks inside of a qq(). Also, the backticks around Name are unnecessary in mysql.

The reason that your code doesn't work is that the first time through the loop, you delete everything that is not "Anna". The second time through, you delete everything that is not "Maria" (which is everything in the database). The third time, there is nothing left to delete...

Another monk has already provided code using IN, which should be effective, but slow. It all depends on database sizes...

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://319119]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2023-06-06 16:22 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.