Skip to content

Commit

Permalink
mariaDB compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
laiconsulting committed Jan 11, 2023
1 parent 365b4e2 commit eedaec4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion wp-geoquery.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private function handle_two_geom_bool_meta( &$clauses, $meta_query, $type, $prim
$meta_value = ( array_key_exists( 'value', $meta_query ) ? $meta_query['value'] : '' );
$geometry = WP_GeoUtil::metaval_to_geom( $meta_value, true );
if ( ! empty( $geometry ) ) {
$new_meta_value = "{$meta_query['compare']}( meta_value,ST_GeomFromText( %s, %d, 'axis-order=long-lat' ) )";
$new_meta_value = "{$meta_query['compare']}( meta_value,ST_GeomFromText( %s, %d ) )";
$new_meta_value = $wpdb->prepare( $new_meta_value, array( $geometry, WP_GeoUtil::get_srid() ) ); // @codingStandardsIgnoreLine

$std_query = " CAST($metatable.meta_value AS $meta_type) = %s ";
Expand Down

0 comments on commit eedaec4

Please sign in to comment.