sqlite_close()期望参数1是资源,对象给出警告

时间:2012-09-17 13:45:06

标签: php

我该如何解决此警告?

        <?php
          $dir = 'sqlite:/home/ravi/public_html/db/FavoriteApps.db';
          $dbh= new PDO($dir) or die("cannot open the database");
          $query =  "SELECT * from app_category";
          foreach ($dbh->query($query) as $row)
          {

                $strName = $row[1];
                error_log("".  $strName );

                }
          sqlite_close( $dbh);
       ?>

0 个答案:

没有答案