I am having a problem creating a query in PHP to retrieve a json value from a postgresql database.
The problem is within the json WHERE clause of the following simple query
select * from json_data where jsonfield ? 'roottag';
if i use the PDO prepare:
$query->prepare($sqlSelect);
PDO will translate the ? (postgres json operator to see if the json field starts with a specific tag) to $1.
How do i write a sql statement similar to the one above to be used within php PDO?