Re: [PHP-DB] Auto increament

2004-06-28 Thread Rinku
Thank you.
It worked.

Rinku
--- Jonathan Haddad [EMAIL PROTECTED] wrote:
 I believe the data type needs to be int - unless
 mysql interprets 
 auto_increment as a int automatically.
 
 Here's an example from mysql.com
 
 
 CREATE TABLE animals (
   id MEDIUMINT NOT NULL AUTO_INCREMENT,
   name CHAR(30) NOT NULL,
   PRIMARY KEY (id)
   );
 Enjoy.
 
 Jon
 
 On Jun 27, 2004, at 8:25 AM, Daniel Clark wrote:
 
  Yes there is an auto increment field in mySQL and
 most other databases.
 
  Can any of you guide me how to do auto
 increament in a field?
  I think there is one datatype for auto
 increament.
  But I dont know how to do it ?
 
  Rinku
 
  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit:
 http://www.php.net/unsub.php
 
 
 
 




__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



[PHP-DB] Auto increament

2004-06-27 Thread Rinku
Can any of you guide me how to do auto increament in a field?
I think there is one datatype for auto increament.
But I dont know how to do it ?
 
Rinku


-
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!

Re: [PHP-DB] Auto increament

2004-06-27 Thread Larry E . Ullman
Can any of you guide me how to do auto increament in a field?
I think there is one datatype for auto increament.
But I dont know how to do it ?
I'd start by reading the manual and documentation for the database 
application being used. But, generally, auto incremented fields are 
primary keys, unsigned, not null integers. For MySQL, in particular, 
you define a field as auto increment by using AUTO_INCREMENT. Again, 
you can see the manual for more.

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


Re: [PHP-DB] Auto increament

2004-06-27 Thread Daniel Clark
Yes there is an auto increment field in mySQL and most other databases.

Can any of you guide me how to do auto increament in a field?
I think there is one datatype for auto increament.
But I dont know how to do it ?
 
Rinku

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