<div>Hi All</div>
<div>I have a table, where 'cid' field is of type "serial".</div>
<div> </div>
<div>Schema declaration is -> <em>"'cid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, ),"</em></div>
<div> </div>
<div>Aim is to have an incremented value for it.</div>
<div>The code is as below</div>
<div> </div>
<div><em>$lastid = 0;<br> for($delta = 0; $delta < $all_companies; $delta++)<br> {<br> $lastid = db_last_insert_id(rs_companies, cid) + 1;<br> db_query(<br> 'INSERT INTO {rs_companies} ( cid, uid, prevcompany, joindate, releasedate) '<br>
."VALUES (%d, '%d', '%s', '%d', '%d')", <br> $lastid, </em></div>
<div> </div>
<div>With this, I find this 'cid' field is not auto incrementing. Any idea, whats the wrong here.</div>
<div> </div>
<div>Best Regards</div>
<div>Austin.</div>
<div> </div>
<div> </div>