MySQL for other applications
On Tuesday I taught a two-and-a-half hour MySQL tutorial. I’ve placed the manual for that tutorial to the Neon Alley tutorials section. Like most of my tutorials, this document is released under the GNU Free Documentation License.
It is available in RTF (from Word), HTML, and PDF.
Here’s the justification in the introduction:
If you’re going to use MySQL to display information on the web or in another application, you will eventually--sooner rather than later--need to understand the structure of your database and how to construct SQL queries.
Two of the most common applications you’ll use with MySQL are PHP and Dreamweaver. PHP is a programming language, which means you need to understand PHP first. But as soon as you start using MySQL with PHP, you run into the mysql_query() function. PHP has pretty much no built-in MySQL functionality. You construct a MySQL query, give that to PHP, and PHP hands it, intact, to the MySQL server.
Dreamweaver will insulate you from MySQL queries for the first few minutes. But as soon as you start doing anything out of the ordinary, you’ll run up against the “advanced” section of your recordset window. That “SELECT .... FROM... WHERE” phrase in the advanced window is nearly a pure MySQL query.
The appendix also contains some guidance on setting up “record sets” in Dreamweaver, and a sample script that uses PHP, Python, or Perl to output tables from MySQL.
If you notice any errors, please let me know. I’m somewhat unsure about the indexing stuff, for example.
- MySQL for Other Applications
- The basics of working with MySQL for users of other applications such as Dreamweaver, PHP, Perl, or Python.
- MySQL by Paul DuBois•
- Paul DuBois has written probably the most useful MySQL book by far. If you’re looking for an in-depth examination of creating and using MySQL databases, I strongly recommend it.
- Internet and Programming Tutorials
- Internet and Programming Tutorials ranging from HTML, Javascript, and AppleScript, to Evaluating Information on the Net and Writing Non-Gendered Instructions.
More PHP
- Auto-closing HTML tags in comments
- One of the biggest problems on blogs is that comments often get stuck with unclosed italics, bold, or links. You can automatically close them by transforming the HTML snippet into an XML document.
- Stable sorting of numerically indexed arrays in PHP
- From PHP 4.1, sorted arrays are no longer “stable”. That is, if they are resorted and two items are equal values, they no longer can be expected to maintain their order vis-a-vis each other.
- Override the Host: header when using PHP’s readfile
- It is possible to specify HTTP headers when using URLs with PHP’s file-oriented functions such as readfile.
- Add nodes to SimpleXMLElement
- If you want to add child nodes in PHP’s SimpleXML, the correct way to do it is to add the node first, then create it.
- Web display of Taskpaper file
- It is easy to use PHP to convert a Taskpaper task file into simple HTML conducive to styling via CSS.
- Two more pages with the topic PHP, and other related pages
More tutorials
- Django tutorial mostly ready
- My long-promised Django tutorial is pretty much ready. It’s still designed around an in-person tutorial, but you should be able to get started using it even if you’re on your own.
- JavaScript for Beginners revised
- I’ve completely revised my JavaScript for Beginners tutorials to be more in tune with modern JavaScript, and to provide more useful examples in general.
- Invariant sections to disappear from the FDL?
- The Free Software Foundation is revisiting the GNU Free Documentation License. Hopefully, they’ll fix the problem of invariant sections in otherwise open documents.
- Perls before Swine Perl tutorial
- I’ve completely revamped my Perl tutorial, and explicitly released it under the Gnu FDL. This tutorial starts from a simple filter that does nothing but echo to the terminal window, and ends with the ability to split data according to fields and import data into a SQLite database.
- Persistence of Vision tutorial
- A step-by-step tutorial, available under the Gnu Free Documentation License, on using the Persistence of Vision raytracer.
- Two more pages with the topic tutorials, and other related pages