in reply to Missing a bind variable, but where?

Sure, but the calls to param are done in list context. Are you sure non of the calls is returning an empty list? We don't know what $q is, so it's just a guess.

Abigail