0
Salut, j'utilise des rails et un enregistrement actif et il y a un problème avec ma requête d'enregistrement active.Erreur SQL dans ActiveRecord
session[:profile_ids] = [2,4,5]
@profiles = UserProfile.where("key = ? and id in (?)", 'Noc_Address',
session[:profile_ids])
Mais je reçois cette erreur:
Mysql::Error: You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'key = 'Noc_Address')' at line 1: SELECT `user_profiles`.* FROM
`user_profiles` WHERE (id in (361) and key = 'Noc_Address')
Comment puis-je corriger?
Merci.