Error #1142 Mysql

Asked

Viewed 714 times

1

Today in my system I came across this situation. I feed my SELECT with this code:

"SELECT p.codigo,p.nome,p.fantasia FROM pessoas p LEFT OUTER JOIN pessoas_define pd ON pd.cod_pessoa = p.codigo WHERE pd.advogado = 'T' AND p.apagado = 0"

Which means I have the chart PESSOA and in the table PESSOAS_DEFINE define the type. For the SELECT above is working 100% however for the same SELECT by only changing the field of PESSOAS_DEFINE for "client" that stays that way:

SELECT p.codigo,p.nome,p.fantasia FROM p.pessoas LEFT OUTER JOIN pessoas_define pd ON pd.cod_pessoa = p.codigo WHERE pd.cliente = 'T'

Generates the following error:"SELECT commnand denied to user 'xxxxxxxxx@ip' for table 'pessoas'".

1 answer

0


  • That’s why the strange is the same: SELECT p.codigo,p.nome,p.fantasia FROM p.pessoas LEFT OUTER JOIN persons_pd defines ON pd.cod_pessoa = p.codigo WHERE pd.advogado = ’T', it works either the same table and bank

  • Notice the section I put in bold, FROM p.people, would not be FROM people p? I think the mistake is this!

  • Perfect was just that :). Sometimes little details us ferram kkk Thanks

  • Ah... good... happens! P

Browser other questions tagged

You are not signed in. Login or sign up in order to post.