search for: codeid

Displaying 1 result from an estimated 1 matches for "codeid".

Did you mean: coded
2008 May 21
3
Test returned value by sql statement
Hello people, just wanted to know how to actually test returned value from sql statement like : @alreadyused = Promotioncodes.find_by_sql [ "select alreadyused from promotioncodes where id = ?", @codeid ] I would like to check whether @alreadyused has value 1 or 0 It doesn''t seem a simple if @alreadyused would word ... Regards Joel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&...