hi all,
i have two questions, and would appriciate if someone could tell
me where i can find answers to them.
1. what is a structure and where i can find information
on what a structure is (as used in the code below)
2. how does the following line work: $SummaryPerWeek+= <data from select>
i.e. how is the data from select get inserted into <data from select>
==============code below======================================
TrafficPerWeekHour_Check_Hour( $ )
{
# The subroutine checks whether record for
# the specified week and hour exists
select from trafficperweekhour where time=$Record->{time}
# if it doesn't exist - we need to add it:
## TrafficPerWeekHour_Fill_Hour( $ )
structure SummaryPerWeek=0
$WeekDay=0 # Sunday
while ( $WeekDay < 7 )
{
select from trafficperhour where
time=($Record->{time}+$WeekDay*3600*24);
$SummaryPerWeek+= <data from select>
$WeekDay++;
}
SummaryPerWeek/=7;
insert into trafficperhour values $SummaryPerWeek where
time=$Record->{time}
}
=====================================================================
--
- josh
N8MSO
20A8 2FC6 9099 D215 78F4 D005 B9F3 21C4 300C C25E ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- [EMAIL PROTECTED] - tel: +972.58.520.636, http://www.tkos.co.il
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]