error - basic_search() -
SELECT
SQL_CALC_FOUND_ROWS
s.uid,
s.pid,
s.title,
s.his_name,
s.her_name,
s.his_year,
s.her_year,
s.his_month,
s.her_month,
s.icon,
s.photo_count,
t.id as town_id,
t.name as town_name,
t.postcode,
c.id as county_id,
c.name as county_name,
country.id as country_id,
country.name as country_name,
country.suffix as country_suffix,
u.ls_join,
u.town_id,
u.confirmed_f,
u.class,
u.members_only,
u.last_login,
UNIX_TIMESTAMP(u.date_expires) AS date_expires
FROM
search as s,
wt_users AS u,
town as t,
county as c,
country
WHERE
s.uid = u.uid AND
u.town_id = t.id AND
t.FK_county_id=c.id AND
c.FK_country_id=country.id AND
u.online='Y'
AND ((u.ls_join=2 AND u.class=1) OR
(u.ls_join=2 AND u.confirmed_f='Y') OR
(u.ls_join != 2))
AND town_id = '21600'
AND
match(s.title, s.details) AGAINST ('' IN BOOLEAN MODE)
UNION
SELECT
s.uid,
s.pid,
s.title,
s.his_name,
s.her_name,
s.his_year,
s.her_year,
s.his_month,
s.her_month,
s.icon,
s.photo_count,
t.id as town_id,
t.name as town_name,
t.postcode,
c.id as county_id,
c.name as county_name,
country.id as country_id,
country.name as country_name,
country.suffix as country_suffix,
u.ls_join,
u.town_id,
u.confirmed_f,
u.class,
u.members_only,
u.last_login,
UNIX_TIMESTAMP(u.date_expires) AS date_expires
FROM
search as s,
wt_users AS u,
town as t,
county as c,
country
WHERE
s.uid = u.uid AND
u.town_id = t.id AND
t.FK_county_id=c.id AND
c.FK_country_id=country.id AND
u.online='Y'
AND ((u.ls_join=2 AND u.class=1) OR
(u.ls_join=2 AND u.confirmed_f='Y') OR
(u.ls_join != 2))
AND town_id = '21600'
AND
(
t.name LIKE '%%'
OR t.postcode LIKE ''
OR c.name LIKE '%'
)
ORDER BY last_login DESC
LIMIT -20, 20