issue102, use javascript to jump to the correct thumbnail when returing from photo...
[phpfspot.git] / phpfspot_db.php
index e9c99ce62ad906e5345a154c275f1d5d6959bd59..807cf0feb36ca072307497ba4d920208b4b27b3c 100644 (file)
@@ -73,6 +73,7 @@ class PHPFSPOT_DB {
                $this->setConnStatus(false);
             }
             else {
+               sqlite3_create_function($this->db, 'basename', 1, 'basename');
                $this->setConnStatus(true);
             }
             break;
@@ -205,7 +206,7 @@ class PHPFSPOT_DB {
                $row = $this->db_fetch_object($result);
                break;
             case 'pdo':
-               $row = $result[0];
+               $row = $result->fetch();
                break;
          }
          return $row;