Ok, this is driving my crazy!!!
Trying to use the SQL SELECT statement:
SELECT adverts.id AS adverts_id, adverts.table AS adverts_table, adverts.record_id AS adverts_record_id, adverts.filename, websites.id AS websites_id, websites.table AS websites_table, websites.record_id AS websites_record_id, websites.url, categories.id AS categories_id, categories.name AS categories_name, categories.alias, links.id AS links_id, links.name AS links_name, links.category_id, links.description, links.phone_number, links.email
FROM categories
INNER JOIN links ON categories.id = links.category_id
INNER JOIN websites ON links.id = websites.record_id
INNER JOIN adverts ON links.id = adverts.record_id
WHERE adverts.table = "links"
AND websites.table = "links";
and I keep getting the error:
Fatal error: Problem preparing query ( SELECT adverts.id AS adverts_id, adverts.table AS adverts_table, adverts.record_id AS adverts_record_id, adverts.filename, websites.id AS websites_id, websites.table AS websites_table, websites.record_id AS websites_record_id, websites.url, categories.id AS categories_id, categories.name AS categories_name, categories.alias, links.id AS links_id, links.name AS links_name, links.category_id, links.description, links.phone_number, links.email FROM categories INNER JOIN links ON categories.id = links.category_id INNER JOIN websites ON links.id = websites.record_id INNER JOIN adverts ON links.id = adverts.record_id WHERE adverts.table = "links" AND websites.table = "links";) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"links" AND websites.table = "links"' at line 6 in [CLASSIFIED] on line 403
Bookmarks