Hello,
In this case, if you don't select the first 4 input the mysql WHERE start with AND and produces an error.
Do you know how can i do to solve this issue?
fonds.notreSelection:{data:notre_selection}/-
fonds.published:{data:cbox_published}/-
fonds.sg_id:{data:select_sg}/-
fonds.millesime:{data:select_mille}/-
AND
(
fonds.natureProduit:{data:select_type}
OR
fonds.natureProduit1:{data:select_type}
OR
fonds.natureProduit2:{data:select_type}
)
Thanks
Regards
In this case, if you don't select the first 4 input the mysql WHERE start with AND and produces an error.
Do you know how can i do to solve this issue?
fonds.notreSelection:{data:notre_selection}/-
fonds.published:{data:cbox_published}/-
fonds.sg_id:{data:select_sg}/-
fonds.millesime:{data:select_mille}/-
AND
(
fonds.natureProduit:{data:select_type}
OR
fonds.natureProduit1:{data:select_type}
OR
fonds.natureProduit2:{data:select_type}
)
Thanks
Regards
Pretty sure there's an implicit AND between each line, just get rid of the AND
but this
programs.id:{data:programs_list}/-
providers.id:{data:providers_list}/-
sessions.id:{data:sessions_list}/-
(
enrollments.student_first_name:{data:search}/-
OR
enrollments.student_last_name:{data:search}/-
OR
enrollments.student_email:{data:search}/-
)
produces this error if nothing in search
[h1]1064[/h1][h2]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 'OR OR )' at
line 1 [/h2]
And this without /-
programs.id:{data:programs_list}/-
providers.id:{data:providers_list}/-
sessions.id:{data:sessions_list}/-
(
enrollments.student_first_name:{data:search}
OR
enrollments.student_last_name:{data:search}
OR
enrollments.student_email:{data:search}
)
Show only empty fields
programs.id:{data:programs_list}/-
providers.id:{data:providers_list}/-
sessions.id:{data:sessions_list}/-
(
enrollments.student_first_name:{data:search}/-
OR
enrollments.student_last_name:{data:search}/-
OR
enrollments.student_email:{data:search}/-
)
produces this error if nothing in search
[h1]1064[/h1][h2]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 'OR OR )' at
line 1 [/h2]
And this without /-
programs.id:{data:programs_list}/-
providers.id:{data:providers_list}/-
sessions.id:{data:sessions_list}/-
(
enrollments.student_first_name:{data:search}
OR
enrollments.student_last_name:{data:search}
OR
enrollments.student_email:{data:search}
)
Show only empty fields
Put /- after the closing bracket
)/- like that. Get rid of the /- after the {data:search}
This topic is locked and no more replies can be posted.