Login   Register  
PHP Classes
elePHPant
Icontem

Alias and not column name

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      DrasticTools  >  All threads  >  Alias and not column name  >  (Un) Subscribe thread alerts  
Subject:Alias and not column name
Summary:Using Aliases instead of Column Names
Messages:5
Author:Andy Lawton
Date:2007-03-29 09:00:43
Update:2007-04-03 07:59:40
 

  1. Alias and not column name   Reply   Report abuse  
Picture of Andy Lawton
Andy Lawton
2007-03-29 09:00:44
In my SQL statement, I have specified aliases - e.g select column1 as 'Some Useful Name' (note the single quotes and space),as the name of the column isn't very useful for the user. However the grid still shows the column name - can this be changed?

  2. Re: Alias and not column name   Reply   Report abuse  
Picture of dd
dd
2007-03-30 22:50:30 - In reply to message 1 from Andy Lawton
Hi Andy,

Renaming column names is supported in the new version of MySQLPHPGrid, which is called DrasticGrid, which is part of the new tool DrasticTools.
I just released this new package on the website http://www.drasticdata.nl
You are welcome to test it out.

The setting for renaming column names is called "renamecols".
See the help file (DrasticTools.txt) for details.

regards, Olav

  3. Re: Alias and not column name   Reply   Report abuse  
Picture of Andy Lawton
Andy Lawton
2007-04-02 14:11:40 - In reply to message 2 from dd
Ah - thanks! Found the new version and installed it - I can rename the columns fine. A couple of things:

Example1 is missing the options in the line
<?php new drasticGrid($src,$opt);?>
(I have added the $opt)
If there is no option defined, you get an error (at least I did).

Also, the option to not show the primary key table has gone - or is it just I can't find it?


  4. Re: Alias and not column name   Reply   Report abuse  
Picture of dd
dd
2007-04-02 20:24:07 - In reply to message 3 from Andy Lawton
1. $options is optional for all functions. I don't get errors on this, so this may be depend on certain php settings?
2. indeed, the option to not show the primary key column has gone at this time. If it's important I can add it again in a next release. Let me know.

regards, Olav

  5. Re: Alias and not column name   Reply   Report abuse  
Picture of Andy Lawton
Andy Lawton
2007-04-03 07:59:40 - In reply to message 4 from dd
I'll check my PHP settings.

I would like to be able to hide the primary key column. I can do it by editing the CSS file, but it would be nice to have an option to do this properly.