php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29546 autoincrement does not function
Submitted: 2004-08-06 13:39 UTC Modified: 2004-08-17 15:57 UTC
From: webmaster at realscripts dot de Assigned:
Status: Not a bug Package: SQLite related
PHP Version: 4.3.8 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: webmaster at realscripts dot de
New email:
PHP Version: OS:

 

 [2004-08-06 13:39 UTC] webmaster at realscripts dot de
Description:
------------
When I have an auto_increment Integer Field in my SQLite DB and I insert data the auto_increment-field gets NULL as value.

Reproduce code:
---------------
CREATE TABLE test_tbl (
  ID INTEGER PRIMARY KEY,
  name VARCHAR
);

sqlite_open('test.db');
sqlite_query("INSERT INTO test_tbl VALUES ('mark')");

Expected result:
----------------
ID | name
---------
 1 | mark

Actual result:
--------------
ID   | name
-----------
NULL | mark

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-09 14:13 UTC] hugo at concepto dot com dot br
I think this is not a bug.

try:

sqlite_query("INSERT INTO test_tbl VALUES (NULL, 'mark')");

or

sqlite_query("INSERT INTO test_tbl (name) VALUES ('mark')");

or if it is a bug, is a SQLite bug, not a PHP bug.
 [2004-08-17 15:57 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Nov 28 08:05:53 2022 UTC