Re: Question of DB Sequences
| From: | Xavier | Date: | Wed, 14 May 2003 07:18:46 +0000 |
| Subject: | Re: Question of DB Sequences | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-5363@lists.php.net to get a copy of this message | ||
Wingoffire a écrit :
now I'm using the DB package for my older project,which use the MySQL auto_increment to control the Id,but this time I want use the DB::nextId().It really works, but I still want keep the old data in MySQL .Can I set the init value of Id(Sequences)? for example from 10000,but not 1hi, If you want that, you can create the sequences table and fill it with one record containing the last wanted value, it should be enough... your sequence table should be named : table_seq , and then when calling nextId on your table, it should use the table you've created instead of generating a new one. hope it helps Regards -- Xavier