I have used mysql to join three tables and print the data in an HTML table. My query looks like this:
SELECT nid, title, cid, lid, street, city, state, cat_name, cat_icon
FROM
node
JOIN location USING(nid)
LEFT JOIN categories USING(cid)
ORDER BY nid DESC LIMIT 10
Then I print the data into a nice HTML table.
This works good to display my data, but I was curious how I might go about editing a result. Basically a business has data in the ‘node’ table and its address info in ‘location’.
I was going to make a modal or inline edit form but I was curious how you would even update the data since it came from multiple tables?
As stated in mysql manual, multiple-table UPDATE statements can use any type of join permitted in SELECT statements, such as LEFT JOIN.