Code |
Context$sql = "select art.id , art.title, art.titlescots, art.book_id, art.type_id, art.link, tag.title, count(*) as cnt
from articles_tags as qt
LEFT JOIN articles as art ON (art.id = article_id)
LEFT JOIN tags as tag ON (tag.id = qt.tag_id)
where qt.tag_id in
( select qt2.tag_id
from articles_tags as qt2
where qt2.article_id = Burns Summer School
)
group by qt.article_id
order by cnt desc
LIMIT 0,10
"
$error = "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 'Summer School
)
group by qt.article_id
order by cnt desc
' at line 9"
$out = null
$out = null;
if ($error) {
trigger_error("<span style = \"color:Red;text-align:left\"><b>SQL Error:</b> {$this->error}</span>", E_USER_WARNING);
DboSource::showQuery() - CORE/cake/libs/model/datasources/dbo_source.php, line 525
DboSource::execute() - CORE/cake/libs/model/datasources/dbo_source.php, line 201
DboSource::fetchAll() - CORE/cake/libs/model/datasources/dbo_source.php, line 337
DboSource::query() - CORE/cake/libs/model/datasources/dbo_source.php, line 221
Model::query() - CORE/cake/libs/model/model.php, line 2292
Article::relatedArticles() - APP/models/article.php, line 141
ArticlesController::events() - APP/controllers/articles_controller.php, line 745
Object::dispatchMethod() - CORE/cake/libs/object.php, line 121
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194
[main] - APP/webroot/index.php, line 88
Query: select art.id , art.title, art.titlescots, art.book_id, art.type_id, art.link, tag.title, count(*) as cnt
from articles_tags as qt
LEFT JOIN articles as art ON (art.id = article_id)
LEFT JOIN tags as tag ON (tag.id = qt.tag_id)
where qt.tag_id in
( select qt2.tag_id
from articles_tags as qt2
where qt2.article_id = Burns Summer School
)
group by qt.article_id
order by cnt desc
LIMIT 0,10