ON p.id = dp.pageId | ON p.id = dp.pageId | ||||
WHERE dp.documentId = ?", $id); | WHERE dp.documentId = ?", $id); | ||||
while(my $hash = $q->fetchrow_hashref()) { | while(my $hash = $q->fetchrow_hashref()) { | ||||
my $clean = { }; | |||||
foreach my $name ( keys %{$hash} ) { | |||||
if ( $name =~ /^p\.(.*)/ ) { | |||||
my $newname = $1; | |||||
$clean->{$newname} = $hash->{$name}; | |||||
} | |||||
} | |||||
push @pages, $clean; push @pageids, $clean->{id}; | |||||
push @pages, $hash; push @pageids, $hash->{id}; | |||||
} | } | ||||
$q = sqlquery($dbh, " | $q = sqlquery($dbh, " |