diff options
Diffstat (limited to 'inc')
-rwxr-xr-x | inc/poche/Database.class.php | 4 |
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 | } |