Имам един въпрос отностно Codeigniter..
Искам да направя следната заявка.
Но разбирасе не работи, как може да стане?
:roll:
Илиза следнаа грешка:
Искам да направя следната заявка.
Код:
function get_posts($limit = NULL, $offset = NULL)
{
$this->db->select('id,title, LEFT(text, 600) as presentation, time');
$this->db->limit($limit, $offset);
return $this->db->get('blog');
}
Но разбирасе не работи, как може да стане?
:roll:
Илиза следнаа грешка:
Код:
A Database Error Occurred
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as presentation, `time` FROM (`blog`) LIMIT 1' at line 1
SELECT `id`, `title`, LEFT(text, `600)` as presentation, `time` FROM (`blog`) LIMIT 1
Filename: C:\xampp\htdocs\joan\system\database\DB_driver.php
Line Number: 330