|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatcheslxbfYeaa (last revision 2024-04-15 15:40 UTC by testing at example dot com)LmMqtzme (last revision 2024-04-11 21:20 UTC by testing at example dot com) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-11-03 14:20 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Type: Bug
+Type: Documentation Problem
[2020-11-03 14:20 UTC] cmb@php.net
[2022-12-27 06:12 UTC] alisausxbpn53 at gmail dot com
[2022-12-31 06:33 UTC] alisauxbpddn53 at gmail dot com
[2024-04-11 21:20 UTC] testing at example dot com
[2024-04-15 15:39 UTC] testing at example dot com
[2024-04-15 15:39 UTC] testing at example dot com
[2024-04-15 15:40 UTC] testing at example dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 05:00:01 2025 UTC |
Description: ------------ When trying to query a jsonb field in postgresql with the questionmark operator, we get error code 42601. `$pdo->query("SELECT * FROM term_template tt WHERE (sites->0) ? 'site_id'");` `"ERROR: syntax error at or near "$1" LINE 1: SELECT * FROM term_template tt WHERE (sites->0) $1 'site_id'..."` See jsonb operators here: https://www.postgresql.org/docs/10/functions-json.html The query works when executed within a database tool. Test script: --------------- Fixture data in DB "sites" column: [{"site_id": "example.org"}]