in reply to Re^3: Quick 'Quote' DBI Question
in thread Quick 'Quote' DBI Question
In my example, $result is simply the return value of fetchrow_array() - I.e. a single row of data with a single column. Note that a single query can return multiple rows of results:
Every iteration of that while loop sets $col1 and $col2 to the first and second columns of the next result row.while (my ($col1,$col2) = $sth->fetchrow_array()) { # ... }
Using placeholders doesn't have any direct influence on how you fetch the results. It only influences how you prepare and execute the query before reading the results.
Note that using placeholders like this splits up the process in three distinct steps:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Quick 'Quote' DBI Question
by Trihedralguy (Pilgrim) on Apr 06, 2007 at 14:56 UTC | |
by Joost (Canon) on Apr 06, 2007 at 15:02 UTC | |
by Trihedralguy (Pilgrim) on Apr 06, 2007 at 15:05 UTC | |
by ww (Archbishop) on Apr 06, 2007 at 15:16 UTC | |
by Trihedralguy (Pilgrim) on Apr 06, 2007 at 15:34 UTC |