title: Incorrect integer being returned by mysql
body: <p>Before marking the answer as a duplicate, I would like to say that I have been to this Q&amp;A: <a href="https://stackoverflow.com/questions/10255724/incorrect-integer-2147483647-is-inserted-into-mysql">Incorrect Integer (2147483647) is inserted into MySQL?</a> and my problems is the other way around. An integer is being returned wrongly by MySQL. As the question before, I'm working with <code>Steam API</code> and they happen to have really long <code>IDs</code>.</p>
  
  <p>Here are the following steps that I followed:</p>
  
  <ol>
  <li>Get the id of  <code>Dota2_items</code> group (<code>103582791433341052</code>) and insert into the <code>DB</code>. </li>
  <li>The id from the group is stored correctly into the database</li>
  <li>Get the same number from the database which now returns <code>103582791433341060</code></li>
  </ol>
  
  <p><code>GiveawayTasks::where('id', 1)-&gt;first()</code> which translating from Laravel <code>"select * from giveaway_task where id = 1"</code></p>
  
  <p>Notice the 8 values of difference between the two IDs. It looks like that the database has added 8 values to the initial ID.</p>
  
  <p>To tackle the problem, I did <code>PHP_MAX_INT</code> which returns <code>9223372036854776000</code>. Exactly what I was expecting coming from a <code>64 bit machine</code>. Now I tried to subtract the <code>PHP_MAX_INT</code> and the number from the database to see if the int is bigger than the <code>PHP_MAX_INT</code> can handle:</p>
  
  <p><code>PHP_MAX_INT - &lt;Number from the database&gt;</code> -> <code>9223372036854776000 - 103582791433341052 = 9119789245421434948</code> which leads me to the conclusion that I'm not trying to store more in one variable than what <code>PHP_MAX_INT</code> can handle.</p>
  
  <p>I'm not sure what is going on here since this is beyond my expertise. Any help would be greatly appreciated.</p>
  
  <p>I'm using the Laravel framework, but I don't think that is relevant to the case.</p>