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

How to change postion (field) numbers in tables ?

Quote Reply
How to change postion (field) numbers in tables ?
Hello all,

Is it possible (and how) to change the position off the fields in the tables (mysql)?

Example:

Now it is:
ID is position 1
Title is position 2
URL is poistion 3 etc.....

wanna change it to:
ID is position 1
Title is position 3 <---- change of position
URL is postion 2 <---- change of position

- How to make some fields (like isNew, isChanged) input=hidden when i add a link in the admin? Just make a html file instead of auto generate it in the admin ?. Now you seen about 20 fields and only use 4 field to add a link.

Allready thanks.

Quote Reply
Re: How to change postion (field) numbers in tables ? In reply to
I am not sure about changing the position of your fields other than deleting your tables and then editing the SQL.mysql with the field positions you want and then re-setup your tables. OR you could read the documentation at http://www.mysql.com and apply the command codes via telnet or use the codes in the SQL Monitor in the editor.cgi script.

In terms of editing your add form to only include the fields you want, you will have to hack the sub build_html_record_form routine in the DBSQL.pm module (which is something that I would not recommend if you are planning on upgrading to the next version of Links SQL since the new SQL engine may dramatically change codes that are used in the DBSQL.pm module).

What you could try doing is add some elsif statements for your fields that you do not want to appear in the sub build_html_record_form routine. Look at the following codes as a model:

Code:

# Hide the key if this is the key field and hide_key = 1
elsif (($field eq $self->{'db_key'}) and $self->{'db_track'} and $opt->{'hide_key'}) { $output .= qq~<tr><td align=right valign=top width=20%> </td><td><input type=hidden name="$name" value="$value_q"></td></tr>~; }


Regards,

Eliot Lee



Quote Reply
Re: How to change postion (field) numbers in tables ? In reply to
Jerry Su has a mod/hack that will let you change the order fields are displayed in in the Admin screen.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: How to change postion (field) numbers in tables ? In reply to
Thanks guys,

Well i ask Jerry Su to send me the mod/hack that will let you change the order fields are displayed in in the Admin screen. I send a private message to jerry that's his username right?



Quote Reply
Re: How to change postion (field) numbers in tables ? In reply to
Nope...his username is jerrysu. There is another Jerry user.

Regards,

Eliot

Quote Reply
Re: How to change postion (field) numbers in tables ? In reply to
Hello all,

You can find it (thanks to Jerry) at:

http://www.gossamer-threads.com/...=25&Old=allposts