What is the best way in terms of performance to make a lookup in two different tables? There is in each case only 1 row in the result.
I need the address from the 1st table and the image_url from the 2nd table . How can I combine these queries? (the query will run in a while loop)
my $sth = $dbh->prepare("SELECT city, address, c_id FROM table1 WHERE c_id='1125' LIMIT 1");
my $sth = $dbh->prepare("SELECT image_url, zip, c_id FROM table2 WHERE c_id='1125' LIMIT 1");
$row = $sth->rows;