It was only a snippet. I'm working on it now.
Please don't think I'm copying GT::SQL either because I really am not. That is a waste of time for me as I only get satisfaction from writing my own code.
Anyway I hope you can see from the example above that it is nothing like it.
I just shifted the order of the arguments so it now looks something like:
my $sth = $DB->select( ['ID','Name'], 'Forums', { SubCat => 0, ID => '1' }, 'AND' );
...but I can also do:
my $foo = $DB->select( ['ID','Name'], 'Forums', { SubCat => 0, ID => '1' }, 'AND' )->fetchrow_hashref;
....and so on as the select method returns $sth.
I find that order easier as it is in the order of the query.
SELECT Cols FROM Table WHERE BLA='Bla' AND BLA='Bla'
Please don't think I'm copying GT::SQL either because I really am not. That is a waste of time for me as I only get satisfaction from writing my own code.
Anyway I hope you can see from the example above that it is nothing like it.
I just shifted the order of the arguments so it now looks something like:
my $sth = $DB->select( ['ID','Name'], 'Forums', { SubCat => 0, ID => '1' }, 'AND' );
...but I can also do:
my $foo = $DB->select( ['ID','Name'], 'Forums', { SubCat => 0, ID => '1' }, 'AND' )->fetchrow_hashref;
....and so on as the select method returns $sth.
I find that order easier as it is in the order of the query.
SELECT Cols FROM Table WHERE BLA='Bla' AND BLA='Bla'