pg_query_params( SELECT * FROM example WHERE date >= (NOW() - INTERVAL '1 day'), array() );
Above syntax will work, but how can I provide dates dynamically with pg_query_params?
I have tried
pg_query_params( SELECT * FROM example WHERE date >= (NOW() - INTERVAL $1), array('1 day') );
pg_query_params( SELECT * FROM example WHERE date >= (NOW() - INTERVAL $1 day), array('1') );
and several other combinations but they do not seem to work. What is the correct way to do this?