$uid=intval($_GET['uid']); //98765432109876543
$sql = "SELECT * FROM accounts WHERE uid = $uid ORDER BY id DESC LIMIT 1";
Won't return any result, PHP is 64bit.
Below I put the executed commands from mysql client. uid field is BIGINT
Output from the mysql client:
mysql> SELECT * FROM accounts WHERE id = 1 ORDER BY id DESC LIMIT 1;
| id | uid | paid_date |
| 1 | 98765432109876543 | 2015-09-20 12:56:47 |
--
Output from the mysql client:
mysql> SELECT * FROM accounts WHERE uid=98765432109876543 ORDER BY id DESC LIMIT 1;
Empty set (0.00 sec)
So my question is, what is the reason I cannot retrieve the expected value from the first sql query?