Hi, I don’t know if anyone can help me but I was trying to do a batch
insert but got an error saying that there was a problem with the
generated SQL.
Anyone know how to fix this?
<2007-06-15 00:10:46> SQL (0.012701) INSERT INTO numbers
(num1
,num2
) VALUES
(509081924,1620644),(509081924,500231348),(509081924,509659840),(509081924,524396516),(509081924,528220398),(509081924,534085839),(509081924,547781856),(509081924,573547171),(509081924,574312014),(509081924,577805238),(509081924,582805398),(509081924,589756118),(509081924,607286192),(509081924,607425581),(509081924,619176048),(509081924,620010268),(509081924,634632018),(509081924,642685358),(509081924,657185365),(509081924,692756207),(509081924,692790495),(509081924,704706222),(509081924,771555161),(509081924,772265233),(509081924,791020130),(509081924,898075257)
<2007-06-15 00:10:46> Review Load (0.000000) Mysql::Error:
#42000You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near ‘=> 509081924,1620644) LIMIT 1’ at line 1: SELECT * FROM reviews
WHERE (user_id => 509081924,1620644) LIMIT 1
zdennis wrote:
I answered this in a private email, but in case someone searches
archives and has this problem. The issue was that import was being
called on the controller and not on the model. It must be called on
the model,
ie: Book.import
See http://www.continuousthinking.com/tags/arext for more information
Zach
On May 22, 11:35 am, Guanliang L. [email protected]