Hey, could someone give me a bit of help?
Not really sure on including variables within SQL queries yet and have put the following into my code:
archivednewsmonth is just a variable with a month in it (for example "January")
It's not working and not to sure where i'm going wrong? I've never really used variables or the Month("SectionDate") function in an SQL query so far so would just like to get it right so i know in the future
Not really sure on including variables within SQL queries yet and have put the following into my code:
Code:
sql_archived_news = "SELECT SectionID, SectionShortDesc, SectionDate FROM tblNews WHERE SectionMain=1 And "& Month("SectionDate")=archivednewsmonth &" And "& Year("SectionDate")=2006 &" ORDER BY SectionDate DESC;"
archivednewsmonth is just a variable with a month in it (for example "January")
It's not working and not to sure where i'm going wrong? I've never really used variables or the Month("SectionDate") function in an SQL query so far so would just like to get it right so i know in the future
