Using this query:
users = User.where('confirmed_at is NULL AND confirmation_sent_at <= DATE_SUB(NOW(), INTERVAL ? days)', 1)
In mysql goes okay but in Postgresql it fails with:
PG::SyntaxError: ERROR: syntax error at or near "1" LINE 1: ...AND confirmation_sent_at <= DATE_SUB(NOW(), INTERVAL 1 day)) ^ : SELECT "users".* FROM "users" WHERE (confirmed_at is NULL AND confirmation_sent_at <= DATE_SUB(NOW(), INTERVAL 1 day))
I'm trying to understand but missing the context here. Why is the integer 1 not valid in this query?