Calendar-problems

Fellow kirupians!

Hope someone can help me with this.

I have a calendar-class and I want to see if there is a post in my database for any of the dates. I was thinking a nested loop, the first one loops through the dates of the month and the nested one compares variables with the date.

Ex.
loadVariablesNum(“http://url/page.asp”, 0)

for (q = 1; q <= Days; q++){
//load ‘day-symbol’
for(x = 1; x == 10; x++){
if(q == someArray[x]){

//someArray[] from loadVariablesNum

                  //mark day...
             }
         }

Could be a stupid question but I´m new at this…
Very thankful for all help!

Let the db query do the searching for you, and it will return only the matches.

The db query does that.
Say I have a post on the third of this month, then both the date-loop and the nested loop should have a post with ‘03’ in it. The nested loop isnt translated into the values of the variables. Are you following me?
I´ve checked the paths of the variables when I test the movie and it looks correct…

Very grateful that you´re taking the time to help!