I'm looking for a solution How to send parameters for node-maria(mysql) GeomFremText('Polygon (())').
working query
SELECT
GROUP_CONCAT(LINK_ID) AS LINK_LIST
FROM (SELECT DISTINCT LINK_ID FROM SCS_M_LINK WHERE mbrintersects
(GEOM,
GeomFromText
('Polygon
((
36.46830191516196 127.24081993103029,
36.491973470593685 127.24081993103029,
36.491973470593685 127.33235836029054,
36.46830191516196 127.33235836029054,
36.46830191516196 127.24081993103029
))' ))) AS T1;
my backend code(query):
`SELECT
GROUP_CONCAT(LINK_ID) AS LINK_LIST
FROM (SELECT DISTINCT LINK_ID FROM SCS_M_LINK WHERE mbrintersects
(GEOM,
GeomFromText
('Polygon (( ? ?, ? ?, ? ?, ? ?, ? ? ))' ))) AS T1;`
related code:
const bindParams = [ parseFloat(southA), parseFloat(westA),
parseFloat(northA) , parseFloat(westB), parseFloat(northB), parseFloat(eastA), parseFloat(southB),
parseFloat(eastB), parseFloat(southC), parseFloat(westC) ]
const result = await functions.sendQuery( query, bindParams )
These ? <- question mark doesn't work at all.
I think it's becuase I'm missing matching column names, but It's in Polygon, so I do not have a column names...
Could anyone help to send the query..? other queries are working perfect. only this one doesn't work.
question from:
https://stackoverflow.com/questions/66058707/how-to-pass-parameters-when-theres-no-table-columns-geomfromtextpolygon 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…