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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.