I did use date as a column name but I'll change that. Also, I'm trying to select the contents of each column for each recors and do this date calculation but apparently I cannot do both at the same time?
I can do SELECT * from table; but can't do SELECT id, agent, ad_type, date_add('submit', interval 180 day) as expires from table; Any ideas on this one?? TIA, Ed On Mon, 31 Mar 2003, gerald_clark wrote: > > > [EMAIL PROTECTED] wrote: > > >I'm trying go get a future date from a query that contains a datetime > >column. I figured I would be able to use an alias in the query to > >calculate the future date as follows: > > > >select expires as date_add('date' + interval 180 days) from table; > > > 'date' is a string. > Did you mean `date` ? > You should not name a column `date`. That is a reserved word. > > > > >'date' is the column where the datetime is stored in the table. > > > >I'd really like to be able to do this calculation within my query rather > >than pull the value and convert it for use in php. > > > >TIA, > > > >Ed > > > > > > > > > > > > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]