Hi I've searched around the forum and Resources for a global which will display only the main categories, couldn't find one. So i tried creating my own, I just need a little help with how the syntax works
sub {
my @cats = $DB->table('Category')->select( 'Name' )->where('FatherID = 0');
#
for (@cats) {
print "$_<br />\n";
}
}
I'm not exactly sure about the where('FatherID = 0') part. How does perl & SQL work? I'm only used to PHP & SQL
Code:
sub {
my @cats = $DB->table('Category')->select( 'Name' )->where('FatherID = 0');
#
for (@cats) {
print "$_<br />\n";
}
}
I'm not exactly sure about the where('FatherID = 0') part. How does perl & SQL work? I'm only used to PHP & SQL