List:General Discussion« Previous MessageNext Message »
From:2wsxdr5 Date:February 28 2006 8:43am
Subject:returning empty columns
View as plain text  
This is probably going to sound like an odd request, but is there a way 
to return empty columns in Mysql.  For example a roll call sheet I want 
to do a select of names from my table and then add a column for each  of 
the next 12 weeks.  I tried this.....

SELECT `Call`, concat(FName, ' ', LName) as Name, 'Mar-6' ,'Mar-13', 
'Mar-20', 'Mar-27'
FROM table
Order BY LName, FName

The problem is it put that date on every row and I just want the names 
to show up in the column header  I know I could just write some php code 
to print out a table with the columns but I have a handy php function 
the prints the out put of a query in a table already so if I can find 
the right query I don't have to change that code any.

-- 
Chris W
KE5GIX

Gift Giving Made Easy
Get the gifts you want & 
give the gifts they want
One stop wish list for any gift, 
from anywhere, for any occasion!
http://thewishzone.com

Thread
returning empty columns2wsxdr528 Feb
  • Re: returning empty columnsRhino28 Feb
RE: returning empty columnsRandall Price28 Feb