Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Someone explain this to me

Quote Reply
Someone explain this to me
Title => ['3', 'CHAR', '40', '100', '1', '', '']

Someone please define what each value is in here.
Quote Reply
Re: Someone explain this to me In reply to
Hello!


Title => [
'3', this is the number of the sequence of the field how MySQL will construct it.

'CHAR', there you define this will be a fixed character. You can also define a number. To have special functions offered, you can also define DATE/DATETIME, etc

'40', This will construct the admin fixed field.

'100', This will be the size of that field, how many characters or bytes it shal occupy. If you use CHAR it will occupy a fixed bytes of space in your database. If VARCHAR variable character, then you save space at the cost of speed.

'1', This will tell the MySQL if it is NULL or NOT NULL. If 1, it cannot be empty. If zero, it can be empty.

'', Here you fill out a default value so that you can be sure that it will be something pre-defined there.

'' This is a field of and for NIGHTMARE. I leave for pugdog to explain. This becomes extremely important to know its behaviour if you wanna do a lot of import and exports. If you do so, let me know and I will explain.

is that what you are asking for?

I suggest that you download phpMyAdmin from www.phpwizard.net Smile You can then take it further on.

]

------------------
rajani











Quote Reply
Re: Someone explain this to me In reply to
Links needs some information that is not available from the SQL database to properly format the output. It either guesses, or uses the information you provide about each table field in the .def file.

ID => ['1', 'INT', '10', '20', '1', '0', '^\d*\.?\d*$'],

These fiels correspond the options in the Table editor. The first 'ID=>' is the hash/key reference. The list (items between the []) are the values for that key.

'1' - the field number
'INT' -- the field type
'10' -- the width of the field inside Links -- can be given in a nnxnn format for ROWxCOLUM entry box.
'20' -- the maximum size of the field that links will allow the user to add to the database.
'1' -- required (0 - not required)
'0' -- default value if none is entered
'line-noise' -- a regex that is applied to the input to validate it.



[This message has been edited by pugdog (edited October 27, 1999).]
Quote Reply
Re: Someone explain this to me In reply to
So if I want to add 2 more fields in the db for the links, called "Keywords" and "Return Link" and both are optional, I would do what?

Also, how do I specify what fields on the add form are required?
Quote Reply
Re: Someone explain this to me In reply to
NULL or NOT NULL..

you know what NULL means right??

jerry
Quote Reply
Re: Someone explain this to me In reply to
Hi,

Click on Links under table maintenance, and then click on Add a new field. Make sure you .def files are set 666 before you do though!

Cheers,

Alex
Quote Reply
Re: Someone explain this to me In reply to
Hehe...I found that just a few minutes before you posted this.
After adding thru there, is it all ready to import from 1.1 with the 2 extra fields? Or do I have to make some mods to Import.pl?