Forgot to fix pg_query() to pg_query_params()
Fix array constants->variables