I have table with INTEGER PRIMARY KEY and I cannot insert value greater then 2147483647 as a key. Is it possible to increase this value somehow?
UPDATE: Ok, I have php script:
<?php
$sqlite_db = new SQLite3('test');
$sqlite_db->exec('CREATE TABLE test (n UNSIGNED INTEGER)');
$ns = array(1111111111,2222222222,3333333333,4444444444,5555555555,6666666666,7777777777);
foreach ($ns as $n)
{
$statement = $sqlite_db->prepare('INSERT INTO test (n) VALUES (:n)');
$statement->bindValue(':n', $n, SQLITE3_INTEGER);
$statement->execute();
}
$sqlite_db->close();
?>
and what I get in test database is that:
root@localhost:~# sqlite3 test
SQLite version 3.7.3
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from test;
1111111111
-2072745074
-961633963
149477148
1260588259
-1923267926
-812156815
So my question is: how to insert large values into sqlite database from php?
UPDATE2:
I have changed foreach body to:
$sqlite_db->exec("INSERT INTO test (n) VALUES ({$n})");
and it works ok now.