[- if ($fdat{code} == '1234567890') { $udat{access}= $fdat{code}; } $per_page = 35; $page_no = $fdat{'page_no'} ||= 1; $offset = $per_page*($page_no-1); $limit = "limit $per_page offset $offset"; $dbh = &Utils::db_connect(); ($num_data)= $dbh ->selectrow_array("select count(*) from fair_name_final"); ###$import_sth = $dbh->prepare(qq{ select count(distinct email),fair_id,upper(fair_name) from fair_replies join fair_name_final using(fair_id) group by fair_name,fair_id order by fair_id desc $limit}) ; $import_sth = $dbh->prepare(qq{select fair_id,upper(fair_name),date(generated) from fair_name_final order by fair_id desc $limit}) ; $import_sth->execute; $import = $import_sth->fetchall_arrayref(); $import_sth->finish(); $str=Utils::pages($num_data,$per_page,"index.epl"); $dbh->disconnect(); $x=0; -] tradeindia Trade Fairs
tradeindia Trade Fairs

[$ if(!$udat{access}) $] [- Execute('code.html') -] [$ endif $]
[$ foreach $v @$import $] [- ($total)= $dbh ->selectrow_array("select count(*) from fair_replies where fair_id=$v->[0]"); -] [$ endforeach $]
Fair Id Fair Name Responses Date
[+ $v->[0] +] [$ if($udat{access}) $] [+ $v->[1] +] [$ else $] [+ $v->[1] +] [$ endif $] [+ $total +] [+ $v->[2] +]

Page No.:[+ $escmode=0;$str; +]

Advance Search [$ if($udat{access}) $] | Add A New Fair [$ endif $]