From: Matthew M. <ma...@tu...> - 2002-10-21 19:18:50
|
> I would like to tak a closer look at the implemetation of this. It > looks like it's creating an extra table just to calculate the next > sequence number. Do you really want this since it could effectively > double the amount of tables in the database? Hmmm. There might be a way around this. Say we create our OWN sequencer. table : core_sequencer ----------------- column : table_name column : primary_key_name column : current_id When sqlImport calls "create table" with a primary key then the table name and key are inserted into the sequencer. Then when sqlInsert is called the table name is selected. The column name and current id are returned and the id is incremented. This could effectively make sqlInsert a little easier. $core->sqlInsert($data_array, "table_name", TRUE); The TRUE telling sqlInsert to increment. It would already know WHAT to increment from the sequencer table. So you could even have: $core->sqlInsert($data_array, "table_name"); With an automatic check to the sequencer table, effectively returning us to the original format... that we had... 90 commits ago... ;-) Let me know what you guys think... Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 |