:)
Okay, lets say title is ExampleTitle
news.php
Doesn't work so I'll change my title to another.
$user = new User();
$news = $user->ShowNews(ExampleTitle);
echo '<pre>';
var_dump($news);
echo '</pre>';
New title: 22(works)
$user = new User();
$news = $user->ShowNews(22);
echo '<pre>';
var_dump($news);
echo '</pre>';
ShowNews:
public function ShowNews($title) {
$get_news = $this->_db->query('SELECT * FROM news WHERE title = ' .$title);
return $get_news->results();
}
If the title is a number/numbers work, but if it is letter/letters/word/words does not work.