Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Adding columns to the database

Quote Reply
Adding columns to the database
I don't see how to add columns to the database. I know how to do it using phpmyadmin, however I don't see a link to "add a column" to the database through the links SQL admin panel like the howto says.

Can someone give me instructions on the correct way to add five new fields in links sql 2.1.2? and which tables I'm supposed to add columns to..

Also how do I reference these in my custom template sets - thank you!



Jeremy
Quote Reply
Re: [batcave] Adding columns to the database In reply to
Personally, if you know how to add the columns in phpmyadmin I would use that. You just need to remember to resync the table afterwards.

To add a column in Links, go to admin->Database->Links->Properties

At the bottom of this page you should see a link to 'Add Column'. (This is also the place to resync the tables if you modify them outside Links). You'll need to follow the documentation for what to do next.

If you want the extra information to be added to each link then you'll need to add it to the Links table. If it is extra information for Categories then you'll need to choose Properties for the Categories table.

To use these fields in your templates, you just call them with <%FieldName%>.
Quote Reply
Re: [afinlr] Adding columns to the database In reply to
>>>Personally, if you know how to add the columns in phpmyadmin I would use that.<<<

This doesn't allow you to define field sizes, field names etc though. Its all done by default (which isn't always helpful).

I would personally suggest doing it via the admin panel, unless you have a lot of fields that need doing; in which case I would suggest using MySQLMan or PHPMyAdmin.

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] Adding columns to the database In reply to
Agreed. I just find it easier using mysqlman because you can choose where to put the field.