in reply to DBI and MySQL issue
That said, you might consider using this instead.$immh->execute .....; $imm = $immh->fetchrow_array; ## as opposed to $immh->execute() ....; $imm = $immh->fetchrow_array();
Note that I changed the order of the where clause that may reduce the number of lines processed and speed up the query. You also may want to index the pf.name column. Using text in a where clause is generally slow.# Open cursor $imm_qy = "SELECT pv.value FROM profile_values pv, profile_fields pf WHERE pf.name = 'profile_magazine' AND pv.uid = $uid AND p +v.fid = pf.fid"; print "\$imm_qy is $imm_qy .\n"; $immh = $dbh->selectrow_array($imm_qy) or die "Cannot prepare magazine + query: " . $dbh->errstr . "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI and MySQL issue
by chromatic (Archbishop) on May 02, 2007 at 23:48 UTC | |
|
Re^2: DBI and MySQL issue
by dokkeldepper (Friar) on May 03, 2007 at 07:29 UTC | |
by tbone1 (Monsignor) on May 03, 2007 at 12:38 UTC | |
by herveus (Prior) on May 04, 2007 at 11:27 UTC |