in reply to how to speed up querys to mysql
Hi rycagaa, try to use single query like this,
use strict; use warnings; use DBI; my $dbh = DBI->connect( "DBI:mysql:project") or die "Can't connect to +Oracle database: $DBI::errstr\n"; my $sth = $dbh->prepare("SELECT test.id, test1.id FROM test, test1 whe +re test.value=? and test1.value=?"); $sth->execute('friend', 'india') || $sth->errstr(); while (my ($row, $row1) = $sth->fetchrow_array) { print "$row\t$row1\n"; } $dbh->disconnect;
if ($row1 = $row2)
And also use '==' for numeric compare.
Regards,
Velusamy R.
|
|---|