in reply to Re: Creating a perl delete statement with MongoDB
in thread Creating a perl delete statement with MongoDB
at this point i've tried creating a subroutine that is attempting to do this:
sub delete_thefruits my $collection; my $criteria;
If i create a similar function to the above, another one which only deals with the fruitIDs table, would perl understand to differentiate between the two?? or would I need to illustrate that programmatically?for (ref $entry){ ## i think this will check for the type being input +by the user when ('fruitdb::name') { $collection = $FRUIT_NAMES; $criteria->(name) = $entry->{data}{name};
$collection-> remove(criteria); ## this will hopefully eventually remo +ve one entry whether it's fruit name or fruitID }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Creating a perl delete statement with MongoDB
by Theodore (Hermit) on Jul 20, 2017 at 15:16 UTC | |
|
Re^3: Creating a perl delete statement with MongoDB
by thanos1983 (Parson) on Jul 20, 2017 at 13:36 UTC | |
by e0s (Novice) on Jul 20, 2017 at 13:44 UTC | |
by thanos1983 (Parson) on Jul 20, 2017 at 14:44 UTC |