Mysql error 1064

Post Reply
btr
Posts: 197
Joined: Thu Feb 11, 2021 7:04 am

Mysql error 1064

Post 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 
вот такие ошибки вывалились в лог, куда копать?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Mysql error 1064

Post by admin »

вопрос с синтаксисом запроса в поиске

Hot-Indian-men-

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

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

1. удалить ошибку и забыть
2. как-то фильтровать запросы такие, например могу дать код для коммон что б обрезать "-" в конце или по желанию любая другая модификация поиска
Don't forget to run script update
btr
Posts: 197
Joined: Thu Feb 11, 2021 7:04 am

Re: Mysql error 1064

Post by btr »

2 наверное лучше, поделитесь плз.
richmantrade
Posts: 1033
Joined: Tue Dec 04, 2012 8:46 am

Re: Mysql error 1064

Post 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']));
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Mysql error 1064

Post by admin »

да, как вариант )
Don't forget to run script update
Post Reply