Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7089285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:54:11+00:00 2026-05-28T07:54:11+00:00

I got some mysterious bug .. Okay so I’m working in LocalHost with The

  • 0

I got some mysterious bug ..

Okay so I’m working in LocalHost with The latest version on MySQL. I’m working with CodeIgniter (2.0.2)
I’m trying to implement a function like that in a model :

function saveMyFriends($friends_list){

$this->load->library('encrypt');    
    foreach($friends_list as $friend){
        // echo $friend['id'].' : '.utf8_decode($friend['name']).'</br>';

        $query_str ="INSERT INTO sc_friends (fb_id, fb_friends_id, fb_friends_name) VALUES ( ?, ?, ?)";
        $fb_id =$this->session->userdata('user_fbid');
        $this->db->query($query_str, array($fb_id, $friend['id'], sha1(utf8_decode($friend['name']))));
    }
    return TRUE;
}

Which is supposed to save in a database my list of Facebook friends but it happens that around 5% of the results have the same Fb_id … Which is impossible. So I’ve tried to enter some friends manually, I just changedenter code here few lines :

    function saveMyTwoFriends(){

$this->load->library('encrypt');    
        $query_str ="INSERT INTO sc_friends (fb_id, fb_friends_id, fb_friends_name) VALUES ( ?, ?, ?)";
        $this->db->query($query_str, array(7518777XX, 1000028691344XX, sha1(utf8_decode('XXX XXXX'))));
    return TRUE;
}

(Of course, X is either a real number or a Real Name)
But once again , in my database, when I entered the third one manually (the one I give you here in example) I had the recurring “same id” : “2147483647”

How is that possible ?
Thanks 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:54:12+00:00Added an answer on May 28, 2026 at 7:54 am

    2147483647 is the biggest integer representable in 32-bit PHP. If your database library tries to treat bigger number like 100002869134477 as integer – what you get is 2147483647. You may use floats or constant strings or extensions like bcmath or gmp is you need to work with larger numbers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got some problems with finding a bug in php/mysql application, and I wonder
Got some code here that isn't working: $(#sidebar ul li:last).each(function(){ $(this).addClass(last); }); Basically I
Got some error in codeigniter when trying to call parent class. This is what
I got some issue working with UINavigationalControllers for iPad. Issue : UINavigationController1 UINavigationController2 Placed
Unfortunately I've got a bug that I have been working on for 1 full
Got some C code I'm working on, and it looks like it should work.
Got some basic problem again. I need to modify a function that previously returned
Got some questions about the php date function.... Here it goes.. I use jquery's
I got some help with gettin the number of rows returned from mysql, and
I got some difficulties designing my case classes. A simplified version looks like: abstract

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.