#insert new record if it dosent already exist
             if !dbh.select_one('SELECT Salenm FROM Auctions Where Salenm LIKE "%' + c.attributes["href"][/....$/] + '%"')
                dbh.do("INSERT INTO Auctions (Salenm, Date, Location) VALUES (?, ?, 1)", 
...

Ruby Insert new record if it dos...

by bain19.myopenid.com, June 24, 2010 04:33, 1 refactoring, tagged with mysql, if, select, bain19, sql injection

Is there a safer way to-do ...

642d333608cc3483f64dba38cb81bdd2 Talk