Topic: Calendar help


125pr    -- 04-22-2006 @ 6:59 AM
  I thanks all Members, Who provide great help for solving the questions, I am on to built a calendar. I have built age.cfm, checks the entries from the databasethe one and It displays very Ok

Now, I want that It should be like an Event Calendar, I tried, The link will sent the user to next page and URL passed are page.cfm?month=4&day=21&year=2006, The Page.cfm checks the entries from the database and shows the records related to the date.

But here, M records are not showing, query is Executed successfully and No records are shown, still there are records in the database, and Once the day passed, say today is 22, it shows the event for 22, tomorrow 23, it dows not events for 22 then, it shows for 23 instead.

if members understood what i want to say, plz help me with this.



Gurpreet Singh Randhawa
www.randhawaz.com


megan    -- 04-22-2006 @ 8:03 AM
  Hi

My ESP is not working today, can you show us your code (query & output of query) thanks, megan

We have art so that we shall not die of reality ~ Nietzsche


125pr    -- 04-22-2006 @ 8:30 AM
  Yes Megan, Here is The query from where the link is Coming.

<A HREF = "events_calendar.cfm?day=#isday#&month=#month#&year=#year#"> #isday# </A>

where isday picks the recent say today's day

where the event happen, the code is:

<cfquery name="events" datasource="#source#">
SELECT downloads.title
FROM downloads
WHERE downloads.dateadded = #month#/#day#/#year#
</cfquery>
<cfoutput query="events">
<table width="100%" border="0">
  <tr>
    <td>Title</td>
    <td>#events.News#</td>
  </tr>
</table>
</cfoutput>

     

Gurpreet Singh Randhawa
www.randhawaz.com

This message was edited by 125pr on 4-22-06 @ 8:31 AM


megan    -- 04-22-2006 @ 11:58 AM
  ok thanks, have you tried:

WHERE (month(downloads.dateadded) = #url.month#)
AND (day(downloads.dateadded) = #url.day#)
AND (year(downloads.dateadded) = #url.year#)

thanks, megan


We have art so that we shall not die of reality ~ Nietzsche


125pr    -- 04-22-2006 @ 1:41 PM
  It shows Me this type Of Error:

Error Executing Database Query. [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
The error occurred on line 6.

Gurpreet Singh Randhawa
www.randhawaz.com


megan    -- 04-22-2006 @ 1:45 PM
  ok, what is on line 6 and also the lines on either side (5 & 7) also could you show me what the date in your date field looks like (just copy a sample date from your database dateadded field and paste it in your post.  thanks, megan

We have art so that we shall not die of reality ~ Nietzsche


125pr    -- 04-22-2006 @ 1:51 PM
  These are Line Numbers: 5,6,7,8
AND (day(downloads.dateadded) = #url.day#)
AND (year(downloads.dateadded) = #url.year#)
</cfquery>
<cfoutput query="events">

I Debugged the calendar.cfm, and checked that variables are passed as

URL Parameters:
DAY=22
MONTH=4
YEAR=2006

Date in my access database store as:

21/04/2006

and I have provided the Field as textbox in access instead of datetime

ok

Gurpreet Singh Randhawa
www.randhawaz.com


125pr    -- 04-22-2006 @ 2:02 PM
  Hey, Thanks megan, My One Problem Sorted out, The error is removed,

I was misspelling the name of the query, ok I am sorry

Thanks Megan, It is working Now, and as I said It is working only for the day that I am posting, means It shows the downloads for for 22 only, Not of 21 what the matter could be










22/04/2006

Gurpreet Singh Randhawa
www.randhawaz.com


megan    -- 04-22-2006 @ 2:05 PM
  ok - try changing the date field to datetime instead of text (the database does not know the date is a date if you have the field set to text, it thinks the date is a regular string)

and when you insert a date into the date field use the createODBCdatetime() function like so

#createODBCdatetime(mydatevar)#

and when you pull the date from the database you can then format it like this

#dateFormat(downloads.dateadded, "dd/mm/yyyy")#

let me know how that works

regards, megan

We have art so that we shall not die of reality ~ Nietzsche


megan    -- 04-22-2006 @ 2:09 PM
  sorry, did not see your second post as for your comment in the second post, it is giving you exactly what you asked for - where the day = 22, if you want 21 then url.day has to = 21 if you want between dates then you have to use the between operator (between this date and that date)

We have art so that we shall not die of reality ~ Nietzsche


125pr    -- 04-22-2006 @ 2:11 PM
  Thanks Megan for ur help, i will try to use the Between dates function as yu described, Hope all that Gets well and better

Gurpreet Singh Randhawa
www.randhawaz.com


megan    -- 04-22-2006 @ 2:20 PM
  ok - dates can be tricky - easycfm member kevsarg18 has some date tutorials at http://www.lot-o-nothin.com/cfml/tutorials/index.cfm/id/16/ that might be helpful

take care, megan

We have art so that we shall not die of reality ~ Nietzsche


125pr    -- 04-22-2006 @ 2:35 PM
  Sorry Megan Disturbing you again, It works Fine, It takes all the url parameters and process the page, what If Add Navigation to page to display only one record at time, It shows me error, I used the Dreamweaver Deafut recodset paging behaviour but that is creating problem, could u guide me plz in this too

Gurpreet Singh Randhawa
www.randhawaz.com


megan    -- 04-22-2006 @ 3:19 PM
  well, the problem is I only use dreamweaver for design stuff, I don't use it for creating coldfusion code so I wouldn't know how to help you. There are other members who do use dream weaver for creating code and one of them might be able to help and maybe one of them will read this

sorry, megan

We have art so that we shall not die of reality ~ Nietzsche


125pr    -- 04-27-2006 @ 3:06 AM
  Hi megan, My this Query is Giving Problem in Mysql, The Error it Shows is:

Error Executing Database Query. Syntax error or access violation: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(News.postedon) = 27) AND (year(News.postedon) = 2006)' at li
The error occurred on line 8.

Gurpreet Singh Randhawa
www.randhawaz.com


mquack    -- 04-27-2006 @ 3:25 AM
 
quote:


'(News.postedon) = 27) AND (year(News.postedon) = 2006)' at li


If that entire string is part of the error message, then I'd guess that the problem is 'at', and that it should be 'aS'?

http://www.rachelqueensg.com


125pr    -- 04-27-2006 @ 4:29 AM
  Sorry abt ur words of "at" to be "as" i did not caught that, could u explain more briefly

thanks

Gurpreet Singh Randhawa
www.randhawaz.com


mquack    -- 04-27-2006 @ 4:33 AM
  Look at the end of the string that I quoted from your previous message.  It has the word 'at' in it.  If that is actually part of the error message that you are receiving, and it is in your query like that, then it should be 'AS'.  That's all I was pointing out.  If that's not part of your query, then ignore my post.  Smile

http://www.rachelqueensg.com


125pr    -- 04-27-2006 @ 8:46 AM
  All code related to query is ok,i tested it, wel sorry to tell one thing, i am using text fields i the datasbe that might caused trouble, well i try and tell u later

Gurpreet Singh Randhawa
www.randhawaz.com


EasyCFM.COM ColdFusion Forums : http://archive.easycfm.com/forums
Topic: http://archive.easycfm.com/forums/viewmessages.cfm?Forum=12&Topic=9180