PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, December 29, 2021

[FIXED] phpmyadmin, MariaDB 10 and Point columns

 December 29, 2021     geospatial, mariadb, mysql, opengis, phpmyadmin     No comments   

Issue

Trying to edit a column of a table in MariaDB using PHPmyAdmin v5.1.1 gives me trouble. It saves the column as binary and I need to edit the whole row in order to be able to edit it as text. Even doing so, when choosing Edit/Insert next to the appropriate field, I get this copied:

'POINT(0 0)',0

However this is not compatible with MariaDB 10. The only thing that works so far is using a raw query for updating the field like this:

UPDATE `locations` SET `point` = POINT(1, 2) WHERE `locations`.`id` = 169;

My question is, isn't there a way of updating the field through the UI of PHPMyAdmin instead of running manual queries?

Trying to be more specific. This is how the column looks like in PHPMyAdmin:

This

And this is how it looks like when editing the row:

this

Note that because its WKB, it cant be edited directly. However when adding to the point field this:

POINT(1, 1)

PHPMyAdmin changes it to:

'POINT(1, 1)'

And it doesnt work.

Also the comma is needed otherwise MariaDB throws an error:

#1416 - Cannot get geometry object from data you send to the GEOMETRY field

Solution

Well this looks like a bug in the PHPMyAdmin for the newer versions of MySQL and MariaDB. It is described in this very recent article here

Indeed a fix is already deployed and will be available in PHPMyAdmin 5.1.2



Answered By - m33ts4k0z
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing