Error in mysql query

Asked

Viewed 31 times

0

I am hours away from realizing what is wrong with my query. I would like you to give me a help

SELECT 
`recargas`.`valor_recarga` as saldo
FROM `contas_pessoais` 
INNER JOIN `contas` ON `contas`.`titular` = `contas_pessoais`.`titular`
INNER JOIN `recargas` ON `recargas`.`titular` = `contas_pessoais`.`titular`
INNER JOIN `transaccoes` ON `transaccoes`.`transaccao_id` = `transaccao_carregamento`.`transaccao_id`
WHERE `contas`.`titular` = '12';

I have as return this error:

#1054 - Unknown column 'transaccao_carregamento.transaccao_id' in 'on clause' 
  • Does the column exist? the name was entered correctly?

  • 2

    In your query there is no table called 'transaccao_loading'. It would not be correct to use 'personal counts''?

  • All columns and tables referenced in query ... exist!

1 answer

2


The table transact_loading is not in your query, you need to include it in an INNER JOIN.

  • Thanks, @Joel Rodrigues ... I’ve noticed ;)

Browser other questions tagged

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