.
Again, thanks everyone.
-Original Message-
From: Bastien Koert <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; php-db@lists.php.net
Sent: Mon, 20 Jun 2005 13:30:13 -0400
Subject: RE: [PHP-DB] auto-generating next id (in order) for an add script
post your code and db structure, it mi
ct: RE: [PHP-DB] auto-generating next id (in order) for an add
script
post your code and db structure, it might be simpler to use an auto
increment value and let the db do the work in assigning the next
number...
bastien
>From: [EMAIL PROTECTED]
>To: php-db@lists.php.net
>Subject
.php.net
Sent: Mon, 20 Jun 2005 12:27:01 -0500
Subject: Re: [PHP-DB] auto-generating next id (in order) for an add
script. .
I'd recommend you use what mysql provides for this. Auto_increment
flag.
Here's more information on how to make your id column be an
auto_increment primary k
I'd recommend you use what mysql provides for this. Auto_increment flag.
Here's more information on how to make your id column be an
auto_increment primary key.
http://dev.mysql.com/doc/mysql/en/example-auto-increment.html
- Aman Patel, Sys Admin / Database / Web Devloper, International
Outr
Use an autonumber field in MySQL. It will increment automatically every time
you insert a record, and not repeat numbers. No extra PHP code needed. After
the insert query, you can then issue a mysql_insert_id() function that will
return the autonumber field for the last insert, that way you ca
post your code and db structure, it might be simpler to use an auto
increment value and let the db do the work in assigning the next number...
bastien
From: [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] auto-generating next id (in order) for an add script
Date: Mon, 20 Jun 2005
Hello,
I have a site that allows reporters to enter their articles into a
forum. I am then spilling their articles onto the main page from a
MySQL dbase via a php script, read "LATEST ARTICLES".
I am now entering the data myself after they email it to me, however
this is becoming more of a t