MySQL SELECT WHERE returning empty with long numbers, although they are there

Posted by brybam on Stack Overflow See other posts from Stack Overflow or by brybam
Published on 2012-09-02T01:40:03Z Indexed on 2012/09/02 3:38 UTC
Read the original article Hit count: 177

Filed under:
|
|

Alright, so basically the most simple query ever... I've done this a million times...

 SELECT * 
 FROM   purchased_items
 WHERE  uid = '$uid'

if $uid == 123 It works fine and returns all data in rows where uid is 123

if $uid == 351565051447743 It returns empty...

I'm positive 351565051447743 is a possible uid in some rows, i literally copied and pasted it into the table.

$uid is a string, and is being passed as a string.

This is something i've done a million times, and i've never had this simple query not work.

Any ideas why this is not working?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql