mysqli driver, prepared statements and geometry types
August 23, 2010
FYI:
PHP Warning: mysqli_stmt_bind_result(): Server returned unknown type 255. Probably your client library is incompatible with the server version you use!
Probably means you’re selecting a geometry type without calling AsText on it.
Instead of
SELECT place.location_point FROM place WHERE place.place_id = ? |
do:
SELECT AsText(place.location_point) FROM place WHERE place.place_id |
Supposedly this is fixed in PHP 5.3. That isn’t really useful information, nor is the snotty svn commit message to use mysqlnd.
See: http://www.mail-archive.com/php-bugs@lists.php.net/msg127837.html