I'm having problems with a SELECT query, which instead of returning me a single value, gives me too many. The query below:
SELECT costi.id, costo, descrizione, categoria
FROM costi
INNER JOIN categorie
WHERE costi.id = 140
The query fishes data from a DB with two tables (costi and categorie) db structure
The problem I'm having is that: If, for example, I run the query on PHP my admin (by entering instead of $ _POST ['id'], the ID of a cost like 140) instead of just going back one row with the associated data, It comes back two rows (one for each category I've created). query result
They are identical rows, with the same values, except for the category field that is different. I need back just one row with the correct data.