This topic is locked

Add New Field to calcalendar table

1/23/2009 8:58:39 PM
Calendar Template general questions
B
bannero author

How can I add a new Field to the calcalendar table?
I added the field to the table but it does not show the data in any page

J
Jane 1/28/2009

Hi,
to add new field to the calcalendar table edit SQL query on the Edit SQL query tab, add this field on the Choose fields tab and edit SQL query in the List page: Before SQL query event on the Events tab for calcalendar table.

G
garethpDevClub member 4/3/2009

Hi
I am trying to add a new field called "Cost" but am struggling to get this to work.
I have added the field on the chose fields page.
I have tried editing the List page: Before SQL query but I must be doing this in the wrong place. T be honest, I do not understand the query but thought I could apply some logic and add `calcalendar`.`Cost` after `calcalendar`.`Theme` ecah time it appeared. however this has not worked and I get the error...

Error type 256

Error description The used SELECT statements have a different number of columns

URL nexpart.info/calander/calcalendar_list.php?a=return

Error file /home/sites/nexpart.info/public_html/calander/oldinclude/dbconnection.php

Error line 26

SQL query select `calcalendar`.`id`, `calcalendar`.`DateField`, (`calcalendar`.`DateField` + interval `calnumbers`.`n` day) AS `DateField2`, `calcalendar`.`TimeField`, `calcalendar`.`Theme`, `calcalendar`.`Cost`, `calcalendar`.`Description`, `calcalendar`.`Category`, `calcalendar`.`EndTime`, `calcalendar`.`DayEvent`, `calcalendar`.`EndDate`, `calcalendar`.`Period`, `calcalendar`.`Recurrence`, `calcategory`.`Color` from `calcalendar` left join `calcategory` on (`calcalendar`.`Category`=`calcategory`.`id`) left join `calnumbers` on ((to_days((`calcalendar`.`DateField` + interval `calnumbers`.`n` day)) - to_days(`calcalendar`.`EndDate`)) <= 0) where (`calcalendar`.`Recurrence` = 1) and (`calcalendar`.`Period` = 'd') and (1=1) union all select `calcalendar`.`id`, `calcalendar`.`DateField`, (`calcalendar`.`DateField` + interval (`calnumbers`.`n`*7) day) AS `DateField2`, `calcalendar`.`TimeField`, `calcalendar`.`Theme`, `calcalendar`.`Cost`, `calcalendar`.`Description`, `calcalendar`.`Category`, `calcalendar`.`EndTime`,


Can you help?

G
garethpDevClub member 4/6/2009

sorted - missed adding the ,0,0 for the number of columns added