aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Database.class.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2014-04-11 14:00:04 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2014-04-11 14:00:04 +0200
commit389d751e920f39cd72df8d8ae03028238d0289d6 (patch)
tree05a7d947960ed9a3608adbb4fde036d732ae4564 /inc/poche/Database.class.php
parentd5f36a8d9e1bf37abb7ea4549b7e907607a1f5db (diff)
parent5ce397847230c70c513ac4fbc3bfbb31498b443f (diff)
downloadwallabag-389d751e920f39cd72df8d8ae03028238d0289d6.tar.gz
wallabag-389d751e920f39cd72df8d8ae03028238d0289d6.tar.zst
wallabag-389d751e920f39cd72df8d8ae03028238d0289d6.zip
Merge pull request #632 from mariroz/dev
logging by import added; error by creation table if exists in postgresql...
Diffstat (limited to 'inc/poche/Database.class.php')
-rwxr-xr-xinc/poche/Database.class.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php
index a80eea97..d1044a6e 100755
--- a/inc/poche/Database.class.php
+++ b/inc/poche/Database.class.php
@@ -77,7 +77,7 @@ class Database {
77 } 77 }
78 else { 78 else {
79 $sql = ' 79 $sql = '
80 CREATE TABLE tags ( 80 CREATE TABLE IF NOT EXISTS tags (
81 id bigserial primary key, 81 id bigserial primary key,
82 value varchar(255) NOT NULL 82 value varchar(255) NOT NULL
83 ); 83 );
@@ -110,7 +110,7 @@ class Database {
110 } 110 }
111 else { 111 else {
112 $sql = ' 112 $sql = '
113 CREATE TABLE tags_entries ( 113 CREATE TABLE IF NOT EXISTS tags_entries (
114 id bigserial primary key, 114 id bigserial primary key,
115 entry_id integer NOT NULL, 115 entry_id integer NOT NULL,
116 tag_id integer NOT NULL 116 tag_id integer NOT NULL
@@ -407,7 +407,7 @@ class Database {
407 public function getLastId($column = '') { 407 public function getLastId($column = '') {
408 return $this->getHandle()->lastInsertId($column); 408 return $this->getHandle()->lastInsertId($column);
409 } 409 }
410 410
411 public function search($term, $user_id, $limit = '') { 411 public function search($term, $user_id, $limit = '') {
412 $search = '%'.$term.'%'; 412 $search = '%'.$term.'%';
413 $sql_action = "SELECT * FROM entries WHERE user_id=? AND (content LIKE ? OR title LIKE ? OR url LIKE ?) "; //searches in content, title and URL 413 $sql_action = "SELECT * FROM entries WHERE user_id=? AND (content LIKE ? OR title LIKE ? OR url LIKE ?) "; //searches in content, title and URL