BIGINT in MySQL Changes my number? Why is he doing this?

I will try to make everything so simple. I am using the BIGINT data type in a MySQL database table. I have a function that generates a unique random number that can take from 12 to 13 digits.

When I insert a 12-digit number into the database, it enters it just fine,

but when I use a value that is 13 digits or more, it seems to be rounded or something like that. here

Php

$defaultText = 'some string'; //just some string
$web_id = 12;
$element_id = 23112182735363; //case 1 (doesn't work)
//$element_id = 2311218333205; //case 2, does work ()
  mysql_query("INSERT INTO tableName (web_id, element_id, content)
  VALUES ($web_id, $element_id, '".mysql_real_escape_string($defaultText)."')");

Results: in the case of one, it inserts a slightly different number, usually rounded for some reason.

in case two, he inserts the number just fine! Maybe someone can help shed light on this mystery! Thanks again!

large int data type:

bigint(200) 
+3
source share
2
+8

, 32- . PHP, , . echo(PHP_INT_MAX . "<br/>"); $big_int = -6174803190685607000; echo($big_int . '<br/>'); 9223372036854775807<br/>-6174803190685607000<br/>

, . , , "i" make mysqli, .

+1