You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'contents' (SQL: select count(*) as aggregate from (select posts.*, max((case when LOWER(contents.title) LIKE sed then 150 else 0 end) + (case when LOWER(contents.title) LIKE sed% then 50 else 0 end) + (case when LOWER(contents.title) LIKE %sed% then 10 else 0 end) + (case when LOWER(contents.excerpt) LIKE sed then 105 else 0 end) + (case when LOWER(contents.excerpt) LIKE sed% then 35 else 0 end) + (case when LOWER(contents.excerpt) LIKE %sed% then 7 else 0 end) + (case when LOWER(contents.body) LIKE sed then 135 else 0 end) + (case when LOWER(contents.body) LIKE sed% then 45 else 0 end) + (case when LOWER(contents.body) LIKE %sed% then 9 else 0 end) + (case when LOWER(contents.seo_title) LIKE sed then 120 else 0 end) + (case when LOWER(contents.seo_title) LIKE sed% then 40 else 0 end) + (case when LOWER(contents.seo_title) LIKE %sed% then 8 else 0 end) + (case when LOWER(contents.meta_description) LIKE sed then 90 else 0 end) + (case when LOWER(contents.meta_description) LIKE sed% then 30 else 0 end) + (case when LOWER(contents.meta_description) LIKE %sed% then 6 else 0 end)) as relevance from postsinner joincontentsonposts.id=contents.post_idinner joinusersonposts.user_id=users.idleft joincontentsonposts.id=contents.post_idwhereposts.type= post andposts.status!= auto-draft group byposts.id, contents.title,
I got this error.
SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'contents' (SQL: select count(*) as aggregate from (select
posts.*, max((case when LOWER(
contents.
title) LIKE sed then 150 else 0 end) + (case when LOWER(
contents.
title) LIKE sed% then 50 else 0 end) + (case when LOWER(
contents.
title) LIKE %sed% then 10 else 0 end) + (case when LOWER(
contents.
excerpt) LIKE sed then 105 else 0 end) + (case when LOWER(
contents.
excerpt) LIKE sed% then 35 else 0 end) + (case when LOWER(
contents.
excerpt) LIKE %sed% then 7 else 0 end) + (case when LOWER(
contents.
body) LIKE sed then 135 else 0 end) + (case when LOWER(
contents.
body) LIKE sed% then 45 else 0 end) + (case when LOWER(
contents.
body) LIKE %sed% then 9 else 0 end) + (case when LOWER(
contents.
seo_title) LIKE sed then 120 else 0 end) + (case when LOWER(
contents.
seo_title) LIKE sed% then 40 else 0 end) + (case when LOWER(
contents.
seo_title) LIKE %sed% then 8 else 0 end) + (case when LOWER(
contents.
meta_description) LIKE sed then 90 else 0 end) + (case when LOWER(
contents.
meta_description) LIKE sed% then 30 else 0 end) + (case when LOWER(
contents.
meta_description) LIKE %sed% then 6 else 0 end)) as relevance from
postsinner join
contentson
posts.
id=
contents.
post_idinner join
userson
posts.
user_id=
users.
idleft join
contentson
posts.
id=
contents.
post_idwhere
posts.
type= post and
posts.
status!= auto-draft group by
posts.
id,
contents.
title,
my search rule is
` protected $searchable = [
'columns' => [
'contents.title' => 10,
'contents.excerpt' => 7,
'contents.body' => 9,
'contents.seo_title' => 8,
'contents.meta_description' => 6,
], 'joins' => [
'contents' => ['posts.id', 'contents.post_id'],
],
The text was updated successfully, but these errors were encountered: