What is the correct way to pass the WKT-String in PHP when dealing with GeomFormText?
When dealing with GeomFromText in PHP, it is important to pass the Well-Known Text (WKT) string correctly to ensure that the geometry is parsed correctly. The WKT string should be enclosed in single quotes and passed as a parameter to the GeomFromText function. This will allow PHP to properly interpret the geometry data and create the corresponding geometry object.
// Correct way to pass WKT string to GeomFromText
$wktString = 'POINT(1 1)';
$geometry = $conn->query("SELECT GeomFromText('$wktString')")->fetchColumn();