Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By kris digital on
Hi,
I just realized that when I made this query
$result = db_query("SELECT uid FROM {profile_values} WHERE fid = 20 AND value=%d", $uid);
and $uid is 100000479628328, it doesn't work because the number is too big. Even %f won't work. Now I do it like
$result = db_query("SELECT uid FROM {profile_values} WHERE fid = 20 AND value=".$uid);
Is this a bug?
Comments
>Is this a bug? Not really,
>Is this a bug?
Not really, No one would have envisaged having that many users on a site. If you want to avoid possibly security holes arising from stuffing $uid directly into the query you could try using '%s'. Otherwise be very careful that $uid really is just a number.
gpk
----
www.alexoria.co.uk
This ,100000479628328, is way
This ,100000479628328, is way pass the range available for %d.
thanks for your comments,
thanks for your comments, it's actually not our users but facebook's... I'll give %s a shot!