Menu mySQl Select
 

mySQl Select

I can now connect to the databse and I am now working on retrieving data from it.

The original page that I started in November 2019 is quite convenient to test mySQL php scripts. The scripts are run by clicking a button. Making the page a php file makes the documentation more difficult as the page has to be run from the server. When the scripts have been debugged they can then be incorporated into a fully formatted php web page.

The examples on the W3C page

There are 4. The first two just echo data base to the screen and the last two actually construct a table.

While this is what I want to do, and I have written my own examples of doing just so, the last example using Prepared Statements is a little to complicated for me at the moment. While I know what a "Prepared Statement" is I am not sure how it fits into the context of what I am trying to learn here. In addtion, the use of advanced php objects (PDO) is a little beyond me at the moment. The use of the RecursiveIteratorIterator to build a table is a bit much to swallow at first glance.

That being said there is a definite case of "doing a Braybrooke" here!

I need to investigate some of the simpler SELECT techniques before I get too far into RecursiveIteratorIterator. The method of building an HTML table, populating on the fly, is quite elegant but difficult to see what is going on. The class TableRows extends RecursiveIteratorIterator seems to be quite involved.

Top

Links

References: - a note on these

  • PHP MySQL Select Data - https:// www.w3schools.com/php/ php_mysql_select.asp - has multiple examples of the SELECT - I am not sure the best one to use.
  • PHP MySQL Select Data - 🔗 - W3C - a research link - will be removed

Site design by Tempusfugit Web Design -