[wp-hackers] Negative number / symbol in user meta
whsatterwhite at gmail.com
Fri May 3 21:23:03 UTC 2013
I agree with Alex. The column for meta_value in the wp_usermeta table is
LONGTEXT, so you should be able to store it fine. Take another look through
your PHP code.
On Friday, May 3, 2013, Alex Rayan wrote:
> Hi Chris,
> Are you storing latitude and longitude as a separate individual user meta
> key / value pairs or as a serialized array?
> I usually use json_encode on a php array to store multiple values in user
> or post meta and did not have issues with negative values in this case.
> Regardless, negative sign shouldn't be stripped out. Perhaps, it happens in
> the the processing code rather than in the core?
> > I'm creating a user map and storing long and lat for users as user meta
> > when i use get_user_meta, my negative number comes back stripped of the -
> > symbol.
> > Can anyone confirm this or have a suggestion?
> > —
> > 314media.com
> > _______________________________________________
> > wp-hackers mailing list
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> wp-hackers mailing list
More information about the wp-hackers