You can do some trickery with auto increment fields and multiple-column

indexes. Have a look at http://www.bitbybit.dk/carsten/blog/?p=131



Beware that this is apparently a MyISAM-specific trick.



/ Carsten



On Tue, 6 Apr 2010 16:02:48 +0530, "Suryanarayanan"

<n...@auromiraenergy.in> wrote:

> I am new to mysql and am trying to develop a package in php using mysql

as

> backend database.

> 

> I have a table in mysql which has a customer code which is alpha

numeric.

> Eg: J0001 and name and address of the customer. The alphabet signifies

the

> first letter of the name of the customer viz. James. I want to increment

> this code to J0002 when another customer (Jones) details is entered into

> the

> system i.e J0003 and so on. Can any enlightened members help me with

this

> code in mysql. This will be used while coding in php to update the

database

> with the entries made online.

> 

> Looking forth for early replies from friends all over the world.

> 

> Suryanaryanan

> 

>  

> 

> 

> 

> !DSPAM:451,4bbb1148499324901218737!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to