print qq~
Shopping Cart Manager
|
Category
|
Sub
|
Item
|
|
~;
if($id) {
$sth = $dbh->prepare("SELECT id,name FROM category WHERE parent = '$id'");
$sth->execute or die $dbh->errstr;
} else {
$sth = $dbh->prepare("SELECT id,name FROM category WHERE parent = '0'");
$sth->execute or die $dbh->errstr;
}
while ( @slog = $sth->fetchrow_array ) {
$sth2 = $dbh->prepare("SELECT id,name FROM category WHERE parent = '$slog[0]'");
$sth2->execute or die $dbh->errstr;
$rv = $sth2->rows;
$subs = $rv;
$sth3 = $dbh->prepare("SELECT category FROM items WHERE category = '$slog[0]'");
$sth3->execute or die $dbh->errstr;
$rv = $sth3->rows;
$subs2 = $rv;
print qq~
|
$slog[1]
|
$subs
|
$subs2
|
~;
if($id){
print qq~ settings ~;
} else {
print qq~ settings ~;
}
print qq~
|
~;
}
print qq~
|
~;