#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
<%= f.select :something, 1.upto(10) do |i| i end %>

Ruby Select tags

by sfusion.myopenid.com, April 02, 2009 11:01, 9 refactorings, tagged with rails, short, select

I find myself doing this a ...

4f5d54213efb6502baab202f3fb2f09e Talk