SQL Question

From: Frosty <sotmesc_at_ametro.net>
Date: 1999/02/01
Message-ID: <795cql$elo$1_at_osh1.datasync.com>#1/1


I couldn't find any other UseNet groups that came anywhere near close to being directly on topic so I'll try here ....

Program is running on Linux
CGI is in Perl with a DBI interface to MySQL

Where I have:

if ( $count == 1)
 {
   $sth = $dbh->prepare("SELECT DISTINCT email

                         FROM regiondb topicdb verified
                         WHERE regiondb.rid = '$rtp[0]' 
                         AND topicdb.tid = '$ttp'
                         AND regiondb.uid = topicdb.uid
                         AND regiondb.uid = verified.uid
                         ORDER BY email") || die print " DIED \n";
 }
$sth->execute;
$rv = $sth->bind_columns(undef, \$email,);

The bind_columns wants 2 variables ... When I give it two variables it seems to display the contents of the topicdb table.

My intention is to find users (uid) that meet the criteria for a region and a topic and then get that users email address from a table called verified ... Did I do something wrong ?? Received on Mon Feb 01 1999 - 00:00:00 CET

Original text of this message