News Archive
PhpRiot Newsletter
Your Email Address:

More information

MySQL Sequence Generator

Note: This article was originally published at Zend Developer Zone on 16 September 2010.
Zend Developer Zone
I have found that using global sequence for all table is a very good practice. You can mix data ids from all tables in a single place (e.g. search engine index) and do not worry about collisions. Unfortunately MySQL doesn't support sequences and we have to emulate such functional. I will show you how to make it for your database and integrate this solution using Zend_Db.