Page 1 of 1

Mysql error 1064

Posted: Wed Apr 28, 2021 8:14 am
by btr

Code: Select all

 2021-04-28 09:11:03 :: 1064  :: syntax error, unexpected $end :: SELECT SQL_CALC_FOUND_ROWS  gs.gallery_id, gs.thumb_id, gi.sponsor_id, gi.content_count, gi.content_type, gs.total_shows, gs.total_clicks, gs.total_ctr, gt.thumb_url, gd.*, gi.content_count, gi.crop_profile_id, gs.activation_date, gi.added_date, gi.duration, gi.url, gi.gallery_total_shows, gi.sponsor_id, gi.source_url, gi.custom_gallery  FROM rot_gallery_stats1 as gs  JOIN rot_gallery_info as gi on gi.gallery_id = gs.gallery_id JOIN rot_gallery_data1 as gd on gd.gallery_id = gs.gallery_id   JOIN rot_thumbs as gt on gt.thumb_id = gs.thumb_id  			WHERE 1 = 1  AND gi.gallery_status = 'active'  AND gi.gallery_type = 0  and gs.best_thumb = 'yes'  and gs.group_id = 0  and MATCH (gd.alt, gd.description) AGAINST ('Hot-Indian-men-' IN BOOLEAN MODE)   ORDER BY  tested_thumb DESC,  gs.total_ctr DESC  LIMIT 0, 40# queryitems 
2021-04-28 09:18:27 :: 1064  :: syntax error, unexpected $end :: SELECT SQL_CALC_FOUND_ROWS  gs.gallery_id, gs.thumb_id, gi.sponsor_id, gi.content_count, gi.content_type, gs.total_shows, gs.total_clicks, gs.total_ctr, gt.thumb_url, gd.*, gi.content_count, gi.crop_profile_id, gs.activation_date, gi.added_date, gi.duration, gi.url, gi.gallery_total_shows, gi.sponsor_id, gi.source_url, gi.custom_gallery  FROM rot_gallery_stats1 as gs  JOIN rot_gallery_info as gi on gi.gallery_id = gs.gallery_id JOIN rot_gallery_data1 as gd on gd.gallery_id = gs.gallery_id   JOIN rot_thumbs as gt on gt.thumb_id = gs.thumb_id  			WHERE 1 = 1  AND gi.gallery_status = 'active'  AND gi.gallery_type = 0  and gs.best_thumb = 'yes'  and gs.group_id = 0  and MATCH (gd.alt, gd.description) AGAINST ('Behind-the-scene-' IN BOOLEAN MODE)   ORDER BY  tested_thumb DESC,  gs.total_ctr DESC  LIMIT 0, 40# queryitems 
2021-04-28 09:52:06 :: 1064  :: syntax error, unexpected $end :: SELECT SQL_CALC_FOUND_ROWS  gs.gallery_id, gs.thumb_id, gi.sponsor_id, gi.content_count, gi.content_type, gs.total_shows, gs.total_clicks, gs.total_ctr, gt.thumb_url, gd.*, gi.content_count, gi.crop_profile_id, gs.activation_date, gi.added_date, gi.duration, gi.url, gi.gallery_total_shows, gi.sponsor_id, gi.source_url, gi.custom_gallery  FROM rot_gallery_stats1 as gs  JOIN rot_gallery_info as gi on gi.gallery_id = gs.gallery_id JOIN rot_gallery_data1 as gd on gd.gallery_id = gs.gallery_id   JOIN rot_thumbs as gt on gt.thumb_id = gs.thumb_id  			WHERE 1 = 1  AND gi.gallery_status = 'active'  AND gi.gallery_type = 0  and gs.best_thumb = 'yes'  and gs.group_id = 0  and MATCH (gd.alt, gd.description) AGAINST ('Govard-' IN BOOLEAN MODE)   ORDER BY  tested_thumb DESC,  gs.total_ctr DESC  LIMIT 0, 40# queryitems 
2021-04-28 10:08:39 :: 1064  :: syntax error, unexpected $end :: SELECT SQL_CALC_FOUND_ROWS  gs.gallery_id, gs.thumb_id, gi.sponsor_id, gi.content_count, gi.content_type, gs.total_shows, gs.total_clicks, gs.total_ctr, gt.thumb_url, gd.*, gi.content_count, gi.crop_profile_id, gs.activation_date, gi.added_date, gi.duration, gi.url, gi.gallery_total_shows, gi.sponsor_id, gi.source_url, gi.custom_gallery  FROM rot_gallery_stats1 as gs  JOIN rot_gallery_info as gi on gi.gallery_id = gs.gallery_id JOIN rot_gallery_data1 as gd on gd.gallery_id = gs.gallery_id   JOIN rot_thumbs as gt on gt.thumb_id = gs.thumb_id  			WHERE 1 = 1  AND gi.gallery_status = 'active'  AND gi.gallery_type = 0  and gs.best_thumb = 'yes'  and gs.group_id = 0  and MATCH (gd.alt, gd.description) AGAINST ('Blow-jobs-' IN BOOLEAN MODE)   ORDER BY  tested_thumb DESC,  gs.total_ctr DESC  LIMIT 0, 40# queryitems 
вот такие ошибки вывалились в лог, куда копать?

Re: Mysql error 1064

Posted: Wed Apr 28, 2021 8:34 am
by admin
вопрос с синтаксисом запроса в поиске

Hot-Indian-men-

мускл не может понять что надо искать в таком случае

тут варианта 2

1. удалить ошибку и забыть
2. как-то фильтровать запросы такие, например могу дать код для коммон что б обрезать "-" в конце или по желанию любая другая модификация поиска

Re: Mysql error 1064

Posted: Wed Apr 28, 2021 8:40 am
by btr
2 наверное лучше, поделитесь плз.

Re: Mysql error 1064

Posted: Wed Apr 28, 2021 12:37 pm
by richmantrade
Ну наверное что то типа

Code: Select all

if (isset($_GET['search_query']) && preg_match("/(.+)\-$/", $_GET['search_query']))
	$_GET['search_query'] = preg_replace("/(.+)\-$/", "$1", addslashes($_GET['search_query']));

Re: Mysql error 1064

Posted: Wed Apr 28, 2021 7:14 pm
by admin
да, как вариант )