I think this is any easy question, but I couldn't find an answer in the
php Black Book for PostgreSQL.  Does anyone know the equivilant of
auto_increment for PostgreSQL?  This is the php code that I have:

$query = "CREATE table $tablename (id INT NOT NULL PRIMARY KEY, ip TEXT,
customer TEXT, dslphone TEXT, date TEXT, vpivci TEXT)";

This creates the table, but when I need to add data to the Database, I
have to specify a unique id each time.  I need want the id to
automatically increment each time data is added the the DataBase.  Is
there a way to do this by adding an auto_increment option to the id
field when the table is first created?

Thanks for any Help,
-Elkan

PHP version: 4.0.6
OS: RH 7.2
PostgreSQL: v.7.1


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to