While I'm not sure I understand your intention, it seems to me like you need
another table to hold your data.  As Paul stated, AUTO_INCREMENT doesn't work
this way.

Edward Dudlik
Becoming Digital
www.becomingdigital.com


----- Original Message -----
From: "Q Zantos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, 11 June, 2003 22:43
Subject: Second Auto-increment


I would like to auto-increment within an auto-incremented value.
For example, if I have a rental agreement(auto-incremented) and that rental
agreement becomes month-to-month.

I was thinking that I would want to track the receipts as such:

Contract # | Type | Second Auto # | Duration |payment total
1              |  1     |   1                   | 6 months|  6,000
1              |  2     |   1                   | 1 month  | 1,000
1              |  2     |   2                   | 1 month  | 1,000

As you can see, the contract stays the same (1), but the Contract Type changes
to 2(month-to-month). When this happens, the first transaction is reset to
auto-increment from that point forward.

The third record illustrates the second auto-incremented #, within the Type #2.

Although I have seen many auto-incremented examples, I have yet to see one that
auto-increments within another auto-incremented value.

Any suggestions or examples would be appreciated.
Thanks.


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to