Viewing 11 replies - 1 through 11 (of 11 total)
  • you can test it by changing to default theme and deactivating other plugin (temporarily) leaving only EM active and see if its working properly.

    Thread Starter JockeLagercrantz

    (@jockelagercrantz)

    I’ve found a solution.

    Classes -> em-location
    Line 152
    $result = $wpdb->insert($table, $data, $this->get_types($data));
    changed to
    $result = $wpdb->insert($table, $data);

    Did the same on line 145, whereafter I could save changes to locations, which was not possible before.

    location and latitude are set to float in mysql

    location_latitude float Ja NULL
    location_longitude float Ja NULL

    What issues may I run into by deleting $this->get_types($data)?

    here’s the function description of get_types Function to retreive wpdb types for all fields, or if you supply an assoc array with field names as keys it’ll return an equivalent array of wpdb types

    can I know the purpose of deleting $this->get_types($data)? it sounds like not a good idea coz’ it can break EM function

    Thread Starter JockeLagercrantz

    (@jockelagercrantz)

    Purpose. I want latitude and longitude to be saved completely, not truncated. By deleting $this->get_types($data) that is accomplished.
    I don’t want to break any EM function so I would appreciate another solution.

    Thread Starter JockeLagercrantz

    (@jockelagercrantz)

    Obviously, trunkation happens when saved to Mysql. Why is that?

    how about changing the datatype at mysql table instead?

    or setting a length to the float type

    Thread Starter JockeLagercrantz

    (@jockelagercrantz)

    I set flot to 7,7 and put back $this->get_types($data).
    I’m back where I can’t save changes to latitude and longitude. Database error.

    Changed datatype to varchar (12). Same error as above.

    hi,

    hope this article could help you http://code.google.com/apis/maps/articles/phpsqlajax.html

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    a handful of users seem to get this, however, since we’re saving them as floats via wpdb (we use the %f type) and the the mysql should be a float, I have a feeling it’s being caused by something else specific to your site

    if you can figure out what’s causing it on your site, maybe we can correct it for others

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Events Manager] Latitude and longitude not saved right’ is closed to new replies.