Error # 1142 MySQL

1

Today in my system I came across this situation. Food 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"

In other words, I have the PESSOA table and in the PESSOAS_DEFINE table I define the type. For the SELECT above is working 100% however for the same SELECT only changing the field from PESSOAS_DEFINE to " client " which looks like this:

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'

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

    
asked by anonymous 03.03.2015 / 12:27

1 answer

0

According to this post: link

Eh a permission error in the people table!

SELECT p.codigo, p.name, p.fantasia FROM p people LEFT OUTER JOIN personas_define pd ON pd.cod_pessoa = p.codigo WHERE pd.cliente = 'T'

Is your SELECT right?

    
03.03.2015 / 12:32