Creating HTML Tables from SQL
If you are like me you have probably come across this scenario You have wasted your precious time developing a super nice and complex select query to fetch your data from an RDBMS, but you have been doing this in a database client and your SQL is working pretty well. Cute, now you need your application like PHP to run this SQL and produce and HTML table that you should echo to your user. Great! Just when you thought the codding job was done now you need to start referencing php syntax aswell and this code takes you all morning to write since you keep confusing SQL syntax and PHP syntax 😠😠Well you can get on the internet of things and use a php code like this one here by David Walsh, or if you are crazy like me you can make your sql write the HTML code for you so you just simply echo the result to your browser. Lets begin: 1. The Data Set: we first of all need to get the data set that we want to convert into an HTML table. This is simple enough we just run our...