Garry Freemyer wrote:
> Well, the first thing I would suggest is that unless you are using an 
> ancient version of mySql that doesn't support stored procedures that you 
> convert this into a stored procedure in the database and simply pass in 
> your unique parameters to it.
> 
> The advantages of stored procedures are
> 
> 1. They are optimized (some would say compiled) for the database and 
> will run faster.
> 2. They are kept separate and secret from the code, and are secure from 
> injection attacks that can trick your program into thinking a string 
> parameter is a command to run instead of a parameter to compare or sort 
> by.
> 
> 3. One place to store things. When all your database select logic is in 
> the database, there is just one place to edit it at.
> 

Hi Garry,

I'm still new to mysql and didn't know about stored procedures.  I will 
look into that and research how to implement it with Ruby.  Many thanks!
-- 
Posted via http://www.ruby-forum.com/.