I am using Rails 2.0.2 with mysql database
I am getting this error when running a query with Find_by_sql:

"wrong number of arguments (0 for 1)"

Here are my queries:

@authors = Author.find_by_sql["SELECT * FROM authors WHERE name = ?',
name"]
Also
@books = Books.find_by_sql["SELECT * FROM books where title IN( SELECT
title FROM authors where name = ?', name)"]


I am passing in 'name' as a parameter and the URL shows the right
parameter.

Is the syntax of my queries correct?  What can cause this error?
I use partial form and I still get the error.

Please help!!!!

Cypray
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to