ElitePirate
Active Member
Hi
I have a report.php page where when i click a link, the sql statement will be executed and results will be exported to csv file.
To display the links (for example every monthly report)
[Jan report]
[Feb report]
[Mar report]
i use this code :
$lst_csv = array(
'List - Jan 2013'=>
array(
'table'=>'tbl_jan',
'where'=>"WHERE v_id=12",
'db'=>'main',
'select'=>'name,id'),
'List - Feb 2013'=>
array(
'table'=>'tbl_feb',
'where'=>"WHERE v_id=12",
'db'=>'main',
'select'=>'name,id'),
'List - Mar 2013'=>
array(
'table'=>'tbl_mar',
'where'=>"WHERE v_id=12",
'db'=>'main',
'select'=>'name,id'),
according to the current setup every month i need to add 1 portion for that month. Is there anyway i can add all 12 portion for all 12 months, but the array will display the link only if the current month is <= list month.
Lets say i list down the link for all 12 months in 2013. If i run the php now, it should display link for Jan 2013 only.
Any idea?
Thanks
I have a report.php page where when i click a link, the sql statement will be executed and results will be exported to csv file.
To display the links (for example every monthly report)
[Jan report]
[Feb report]
[Mar report]
i use this code :
$lst_csv = array(
'List - Jan 2013'=>
array(
'table'=>'tbl_jan',
'where'=>"WHERE v_id=12",
'db'=>'main',
'select'=>'name,id'),
'List - Feb 2013'=>
array(
'table'=>'tbl_feb',
'where'=>"WHERE v_id=12",
'db'=>'main',
'select'=>'name,id'),
'List - Mar 2013'=>
array(
'table'=>'tbl_mar',
'where'=>"WHERE v_id=12",
'db'=>'main',
'select'=>'name,id'),
according to the current setup every month i need to add 1 portion for that month. Is there anyway i can add all 12 portion for all 12 months, but the array will display the link only if the current month is <= list month.
Lets say i list down the link for all 12 months in 2013. If i run the php now, it should display link for Jan 2013 only.
Any idea?
Thanks