title: Geometry field issue with MariaDB and PHP prepared statement
body: <p>From a PHP script, using mysqli prepared statement to INSERT a row, I'm getting an error returned from MariaDB on a field of type POINT. Code looks a something like this:</p>
  <pre><code>$sql = 'INSERT INTO reports (location) VALUES (?)';
  $stmt = $mysqli-&gt;prepare($sql);
  $stmt-&gt;bind_param('s', $variable);
  $variable = 'POINT(10,10)';
  $stmt-&gt;execute();
  </code></pre>
  <p><code>location</code> is intended to store GPS co-ordinates and is defined as <strong>point</strong> data type in it's column definition. The error which is returned in the resulting stmt object has <strong>errno = 1416 error = Cannot get geometry object from data you send to the GEOMETRY field.</strong></p>
  <p>Other columns of varchar type work without issue, so I'm guessing it is somewhere in the underlying table definition being <em>POINT</em> data type and the presentation of the intended data <em>POINT (10, 10)</em> as a string type in the prepared statement. I had initially thought about just storing lat, lon as individual DECIMAL columns but the POINT data type may serve future purposes much better.</p>
  <p>In the MariaDB monitor, the statement:</p>
  <pre><code>INSERT INTO reports (location) VALUES (POINT(10,10));
  </code></pre>
  <p>will work fine and insert the row into the database table.</p>
  <p>Also, if I were to use <em>mysqli_query</em> (which I don't intend using) as follows;</p>
  <pre><code>$variable = 'POINT(20, 20)';
  $sql = &quot;INSERT INTO reports (location) VALUES ($variable)&quot;;
  mysqli_query($mysqli, $sql) 
  </code></pre>
  <p>it works as intended.</p>
  <p>So, my query is how in PHP, to replicate the working MariaDB monitor statement or mysqli_query() example via a mysqli prepared statement.</p>