In Wordpress, how can I extract data from an external Microsoft SQL database for display as a read-only table?
To be clear, this is not a question of how to convert Wordpress to MS SQL, but rather how to extract data for a specific widget from a source outside the main Wordpress DB. The data I need to retrieve is in the MS SQL database.
For example, suppose I need to pull out stores and watches:
SELECT id, name, address, city, state, zip, phone, openingTime, closingTime
FROM locations
ORDER BY name
And display this data in a table on a Wordpress page:
<table>
<tr>
<th>Store Name</th>
<th>Address</th>
<th>Store Hours</th>
</tr>
</table>
source
share