aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche
diff options
context:
space:
mode:
authortcit <tcit@tcit.fr>2014-03-26 16:36:42 +0100
committertcit <tcit@tcit.fr>2014-03-26 16:36:42 +0100
commitcc60cbbbabba932648cfe35ca1ae8b7ddba1186c (patch)
tree3c0ae8075b1703d55b834a20d98801087938c9a1 /inc/poche
parentd619120fc45693b73d14e4f2c8b98fc5b5489b7c (diff)
downloadwallabag-cc60cbbbabba932648cfe35ca1ae8b7ddba1186c.tar.gz
wallabag-cc60cbbbabba932648cfe35ca1ae8b7ddba1186c.tar.zst
wallabag-cc60cbbbabba932648cfe35ca1ae8b7ddba1186c.zip
Finished search engine function
Now searches also in title and in original url
Diffstat (limited to 'inc/poche')
-rwxr-xr-xinc/poche/Database.class.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php
index 6aad16c1..6f5c9ac0 100755
--- a/inc/poche/Database.class.php
+++ b/inc/poche/Database.class.php
@@ -391,8 +391,8 @@ class Database {
391 391
392 public function search($term){ 392 public function search($term){
393 $search = '%'.$term.'%'; 393 $search = '%'.$term.'%';
394 $query = $this->getHandle()->prepare("SELECT * FROM entries WHERE content LIKE ?"); 394 $query = $this->getHandle()->prepare("SELECT * FROM entries WHERE content LIKE ? OR title LIKE ? OR url LIKE ?"); //searches in content, title and URL
395 $query->execute(array($search)); 395 $query->execute(array($search,$search,$search));
396 $entries = $query->fetchAll(); 396 $entries = $query->fetchAll();
397 return $entries; 397 return $entries;
398 } 398 }