I have a postgres query to fetch data from table "like"
Code is
$query = 'select * from like where (discovery=? and user=?);';
$res = pg_query_params($query, array($_POST['discovery_id'], $_POST['user_id']));
However this on execution give error
<b>Warning</b>: pg_query_params(): Query failed: ERROR: syntax error at or near "where"
LINE 1: select * from like where (discovery=? and user=?);
^ in
How can I execute this query properly? i have another tables named discovery and user. could that be the issue?