Summary of Perl DBI.pm

Four stages cycle of queries.
  1. Prepare
  2. Execute
  3. Fetch
  4. De-allocation

Methods of Fetching
method return remark
fetchrow_array @row
fetchrow_arraryref $row_arraryref
fetchrow_hashref $row_hashref
dump_results print
selectrow_array @row Only single row
selectrow_arrayref $row_arrayref Only single row
fetchall_arraryref $resultset_arraryref The entire results set
fetchall_hashref $resultset_hashref The entire set
fetch @row Used with bind_col/bind_columns


posted on 2010-11-17 15:45  夜雨长安  阅读(179)  评论(0编辑  收藏  举报

导航