Gossamer Forum
Home : Products : Gossamer Links : Discussions :

restetting/altering Link ID auto counter

Quote Reply
restetting/altering Link ID auto counter
Perhaps a weird request.

You know how when a new record (link) is added to LinksSQL, the LinkID is auto-incremented?

Well, for somereason in all of my fussing around convertinga Links2.0 to LinksSQL my counter has gone from 800 to 1600 -- even though I only have 800 records. Is there any way to "reset" the auto-increment so the next count will be 801 and not 1601?

Thanks,
Mike
Quote Reply
Re: [Swaylock] restetting/altering Link ID auto counter In reply to
To be honest, its not really worth doing. I did write a plugin to do this a while ago (not really safe for a public release though, which is why I never realeased it) ... which basically re-ID's the lsql_CatLinks and lsql_Links tables (doesn't do the other tables though). I can send over a copy for you if you want... but you will need to backup your database first, just in case (that is, as long as I can find the plugin Tongue).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] restetting/altering Link ID auto counter In reply to
Andy -
I still have it. And yes - please, backup your database as it is one hell of a dangerous script if something goes wrong (experience talks here). You use it - your problem. It certainly does the job though.
Quote Reply
Re: [Andy] restetting/altering auto-increment In reply to
Andy,

Thanks -- but I don't really think I'll need that plugin. There's only ONE LINK in the db after #800. All I need to do is change the next auto increment, and then edit that one link. Just want to make sure I'm doing it the "right way" for LinksSQL.

Anybody know how to do this?

Thanks,
Mike