Can I use MySQL joins with DW Anything?
Ответ
Yes, you can use MySQL joins to retreive the results from multiple related tables.
Within an SQL query, set the join as normal:
SELECT user.username, contact.address FROM #__users AS user LEFT JOIN #__contact_details AS contact ON user.id = contact.user_id
In your Template, in DW Anything module settings, use the column names:
User: {usersname}<br />Address: {address}
Note that you must not include the table name from SELECT clause in your template tags, just the column name.
Добавить комментарий