|Syntactic Confectionery Delight|
Re^3: DBI placeholders for spatial databy LanX (Sage)
|on Jun 26, 2021 at 11:23 UTC||Need Help??|
> ST_GeomFromText('POINT( ? ? )')
To make my argument clearer: this 'POINT( ? ? )' might look like an SQL function but it's a string which is parsed by ST_GeomFromText() !
Please note the missing commas, too. Function arguments in SQL are comma separated.
The MariaDB documentation calls the argument a WKT with T for Text! °
WKT is not SQL, pretty much like SQL is not Perl
Your string passed here to ST_GeomFromText() will always include literal question marks in your example.
There is nothing like ? placeholder handling inside strings in SQL!
The error you get will be along the line "too many arguments for placeholders" because the two ? inside a string are just ignored.
°) The Well-Known Text (WKT) representation of Geometry is designed to exchange geometry data in ASCII form