There are 3 tables
content: id|name|text category: id|name contact: id_content|id_category I need to get all the categories, one of the content, and display their names.
tobish as a result: content => (category1, category5, category20)
There are 3 tables
content: id|name|text category: id|name contact: id_content|id_category I need to get all the categories, one of the content, and display their names.
tobish as a result: content => (category1, category5, category20)
Deonis Comment Response
SELECT cat.name FROM category cat INNER JOIN contact cont ON cat.id = cont.id_category WHERE cont.id_content = ? Source: https://ru.stackoverflow.com/questions/335169/
All Articles
cat.nameFROMcategorycatINNER JOINcontactcontON (cat.id=cont.id_category) WHEREcont.id_content=? [1]: sqlfiddle.com/#!2/1e3b8/3/0 - Deonis