Error (DBQueryError) when searching
When I try to search in a project i get the following error:
Query failed with message '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 '2'' AND `project_id` = ?' at line 1'
Error params:
File: /home/gathacol/public_html/hq/environment/library/database/adapters/AbstractDBAdapter.class.php
Line: 373
Sql: SELECT COUNT(`id`) AS 'row_count' FROM `hq_tags` WHERE `tag` = 'flash'2'' AND `project_id` = ?
Error number: 1064
Error message: 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 '2'' AND `project_id` = ?' at line 1
Backtrace:
#0 /home/gathacol/public_html/hq/environment/library/database/adapters/AbstractDBAdapter.class.php(270): AbstractDBAdapter->prepareAndExecute('SELECT COUNT(`i...', Array)
#1 /home/gathacol/public_html/hq/environment/library/database/DB.class.php(159): AbstractDBAdapter->executeOne('SELECT COUNT(`i...', Array)
#2 /home/gathacol/public_html/hq/application/models/tags/Tags.class.php(180): DB::executeOne('SELECT COUNT(`i...', 'flash?', 2)
#3 /home/gathacol/public_html/hq/application/models/projects/Project.class.php(660): Tags->countProjectObjectsByTag('flash?', Object(Project), false)
#4 /home/gathacol/public_html/hq/application/views/project/search_sidebar.php(8): Project->countObjectsByTag('flash?')
#5 /home/gathacol/public_html/hq/environment/classes/template/Template.class.php(76): include('/home/gathacol/...')
#6 /home/gathacol/public_html/hq/environment/classes/template/Template.class.php(48): Template->includeTemplate('/home/gathacol/...')
#7 /home/gathacol/public_html/hq/environment/classes/template/template.php(35): Template->fetch('/home/gathacol/...')
#8 /home/gathacol/public_html/hq/application/controllers/ApplicationController.class.php(31): tpl_fetch('/home/gathacol/...')
#9 /home/gathacol/public_html/hq/application/controllers/ProjectController.class.php(96): ApplicationController->setSidebar('/home/gathacol/...')
#10 /home/gathacol/public_html/hq/environment/classes/controller/Controller.class.php(69): ProjectController->search()
#11 /home/gathacol/public_html/hq/environment/classes/controller/PageController.class.php(62): Controller->execute('search')
#12 /home/gathacol/public_html/hq/environment/classes/Env.class.php(119): PageController->execute('search')
#13 /home/gathacol/public_html/hq/init.php(138): Env::executeAction('project', 'search')
#14 /home/gathacol/public_html/hq/index.php(9): require('/home/gathacol/...')
#15 {main}
Autoglobal varibles:
$_GET: Array (
['search_for'] => (string) 'link'
['c'] => (string) 'project'
['a'] => (string) 'search'
['active_project'] => (string) '2'
)
$_POST:
$_COOKIE: Array (
['__utma'] => (string) '151083695.1050822286.1211243560.1211460633.1211773180.4'
['__utmz'] => (string) '151083695.1211773180.4.4.utmcsr=mugatha.gathacol.net|utmccn=(referral)|utmcmd=referral|utmcct=/un-nuevo-amigo/'
['id93c65403ce6b695a583e9e4c8c5b25e687283ee6'] => (string) '1'
['93c65403ce6b695a583e9e4c8c5b25e687283ee6'] => (string) 'e680ab15b6867052614ec2333e942163b04287ec'
['remember93c65403ce6b695a583e9e4c8c5b25e687283ee6'] => (string) '1'
['comment_author_'] => (string) 'ana'
['comment_author_email_'] => (string) 'ana@huellaspyp.com'
['comment_author_url_'] => (string) 'http://huellaspyp.com'
['PHPSESSID'] => (string) '0af73d19ad38331380d0b591122cec7d'
['__utmb'] => (string) '166264103.9.10.1211915777'
['__utmc'] => (string) '166264103'
)
$_SESSION:
Execution time:
Total execution time: 0.329317 seconds
It happens every time I try searching.
How can this be solved?
