Get Long from database
-
Hi Eyal,
I want to let buddypress members post from the frontend and automatically assign the geo details they provided in their buddypress profiles to their posts.
I have managed to grab most of the members details from the wppl_friends_locator table except for the long value which I just cant get to work.
The following gets the lat value
$mylat = $wpdb->get_var(“SELECT lat FROM wppl_friends_locator WHERE member_id = ‘$user_id'”);
but for some reason this does not work for the long value
$mylat = $wpdb->get_var(“SELECT long FROM wppl_friends_locator WHERE member_id = ‘$user_id'”);
any idea why this might be happening.
Also is there anyway I can get the _wppl_lat, _wppl_long and _wppl_address meta to update via the frontend form. I have tried updating meta values (note: the values are there if I check the source but the default new york values remain in the fields on the actual page and override my hidden values if I update from the backend dropping the database entry.
Any feedback would be greatly appreciated.
Thanks Tkhan
- The topic ‘Get Long from database’ is closed to new replies.