Jump to content

is it possible to have two auto incrementing fields in one table?


jbrill

Recommended Posts

I have been trying to get two different rows to auto increment in the same table? If so how do i do it? it says u can only have one primary (obviously) and that is the auto incrementing field. Is there any way around this?

 

here is the mysql error form phpmyadmin...

#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key

 

basically, im creating a job management system.

quote id's are auto incrementing because every time a job is entered into the database, it needs to be identified by a "quote ID number" however, once the customer approves the quote, the job number is created and is used to identify the rest of the functions the site offers.

 

Here are my concerns with using the quite id as the job number aswell.

 

-when a job is quoted, but declined, it will still be given a job # and it will increment. It needs to have the quote id so if i need to find the declined quotes down the road, i still can. However i do not want it to have a job number..

 

-for invoicing purposes, usually quote numbers and job numbers are different.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.