I'm trying to do a search using INNER JOIN
in the service table , the agenda.serv_id field is a string "vector" and its value in the database is: 1, 2 '
I did 3 insert's in the service, the only problem is that IN
only works when I use (1,2) but in that case I can not set it that way because every schedule has the id of some service
Even though converting the field to integer, the result is the same, as I did not find any function of splt in mysql, the case remains unsolvable. If it is necessary to do the process in the back end I am using the VisualBasic programming language. Here is the code:
SELECT
agenda.agen_id,
agenda.agen_data,
agenda.agen_turno,
group_concat(servico.serv_nome),
agenda.agen_total,
profissional.prof_comissao,
agenda.agen_obs,
profissional.prof_nome,
cliente.cli_nome
FROM
agenda
INNER JOIN servico ON servico.serv_id *in (agenda.serv_id)*
INNER JOIN profissional ON agenda.prof_id = profissional.prof_id
INNER JOIN cliente ON agenda.cli_id = cliente.cli_id