in reply to Double Database Search and Sort

What sort of database are you querying from? This is really an SQL question, because the Perl part is easy. The following sql will work if you are using Oracle:

select sp.id,sp.state,sp.city,sp.discription,sp.approval from SpeedTrap sp, Comments cm WHERE sp.state='$state' AND sp.approved='$status' AND cm.approval = '$approval' AND cm.id = sp.id
May the Force be with you

Replies are listed 'Best First'.
Re^2: Double Database Search and Sort
by awohld (Hermit) on Sep 25, 2004 at 03:54 UTC
    I'm using MYSQL, what would that SQL look like?