I'm trying to call db_1row and it's failing, saying "Query did not return any row.", but it should return 1 row.
I'm calling it like this:
db_1row select_policy SQL -column_array policy
and inside the XQL file I use this query:
select p.*
from rsvp_policies p join rsvp_reservations r on (p.policy_id = r.policy_id)
where r.reservation_id = :reservation_id
When I go into psql and do the query, it returns exactly one row. I've tried hardcoding the query in without using the XQL file and checked that reservation_id is indeed present. Any ideas on what's wrong?
Thanks