[wp-hackers] Negative number / symbol in user meta

William Satterwhite 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.

http://codex.wordpress.org/images/9/9e/WP3.0-ERD.png

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?
>
> Regards,
> Alex
>
>
> On Fri, May 3, 2013 at 4:54 PM, Chris Carter <chris at 314media.com<javascript:;>>
> wrote:
>
> > 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
> > wp-hackers at lists.automattic.com <javascript:;>
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com <javascript:;>
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


-- 
Hunter Satterwhite
http://linkedin.com/in/hsatterwhite
(252) 762-5177


More information about the wp-hackers mailing list