PHP Generator 11.4 for MySQL by SQL Maestro


Today we are reviewing the free “lite” edition of PHP Generator for MySQL, and the first questions that spring to mind when evaluating any “free” or “lite” editions of software are a) are they any good and b) is it really free?

Well I am happy to confirm that the free edition is perfectly usable but there are some advanced features that you have to purchase the “PRO” edition to access, and it currently costs $79 for private use or $129 for a business license.

So the key question is – which features are missing from the “lite” version? Well having a quick look around the interface, the options which prompted the “please upgrade” screen featuring pictures of credit cards included trying to use an HTML Editor, Autocomplete fields, Table or Database user authentication, Update Queries, Client Validators, Totals, Lists, Events and all but the “General” form.

The show-stopper for me personally is that although the program offers the choice of the classic MySQL driver, the MySQLi driver and PDO – only the classic is available in the free version. I much prefer PDO as it’s much more secure (i.e. no injection attacks if used properly) but many people still use the classic MySQL driver so it’s not going to be a show-stopper for everyone.

Reviewers on couldn’t be more split on this program – they either love it or hate it! To be fair I think the people who hate it are simply peeved because they feel that a “free” program should be the fully featured version and not merely a hook to get people to buy the full version. I don’t usually take too much stock of reviews on there as they rarely give a true reflection of the software being reviewed.


Installation was straight forward and the installed program took ~15mb of disk space. It comes with the usual link to the publishers website and purchase pages along with an uninstall option.


The program takes the form of a “wizard” interface – it’s very basic but does the job.

PHP Generator Login Screen

PHP Generator Login Screen

The program opens on the connection page. The usual prompts for Host, User name, Password and Port Number are there, with a drop down list to select the database once you’ve entered the other connection details correctly.

It helpfully gives you the option to specify alternative connection details for your script. For example, you may be developing the application on your local PC and connecting to a local copy of the database for the program to read the DB Schema, but generating the scripts for a live server where they will connect to the live database. It’s a nice touch.

The next page provides the following buttons: “Add Table or View” which as you would expect brings up a list of tables and views in the database and allows you to select the tables you wish to build scripts for via a checkbox, with the usual Mark All / UnMark All type of functions.

PHP Generator Select Table/View Screen

PHP Generator Select Table/View Screen

If you make a mistake and add a table twice then the next page will automatically remove the duplication.

The “Create Query” button brings up a text box where you can enter a SQL query (only SELECT queries are available in the free version). I was hoping it may have a visual query editor like the one in Microsoft Access, but alas it is simply a text box. If you create an invalid query it will let you name and save the query, but it will warn you when you try to navigate to the next page. I like this feature – I hate it when you have to leave your desk in the middle of writing a query and the software won’t let you save it until it validates!

On to the next page and you are presented with a list of selected tables/views/queries which you can double-click upon to select field level options.

PHP Generator Field Option Screen

PHP Generator Field Option Screen

If you have Foreign Keys defined in your database then it will pick these up automatically to create a lookup in the form of a dropdown list. It doesn’t appear to “guess” Foreign Keys if they are not set. Also in the “Display Field” box you can only select a single field, not a formula. So for example in the Film_Actor table in Sakila where you link to the actor, you can only choose the First Name or the Last Name when in fact it would be nice to have a formula i.e. First Name + ” ” + Second Name. Of course you can easily get around this problem by creating a query and use the CONCAT function to join the fields together – but it would be nice to be able to do it without that extra step.

Finally you can select a basic colour theme for the site from 7 standard options or you can edit the CSS yourself.

PHP Generator Style Selection

PHP Generator Style Selection

In the last step you can set a page header/footer, set security options and database driver (if you have the PRO version) and where you wish to output the files.

Using the AppServ stack it was unable to auto detect where to create the files, and it would have been nice if there was some kind of prompt after generating the files to say “Click OK to launch Application in browser”, but hey these are fairly minor niggles.

Generated Applications

The default generated application has a list of tables / views running down the left of the page, and a grid showing matching data in the selected table, with View/Edit/Delete and Copy options taking up the first 4 columns. It has a basic filter above the grid (you can filter on multiple fields I believe in the PRO version). You can also sort the data by clicking the column headers but you cannot have multiple field sorts.

PHP Generator Sample App

PHP Generator Sample App

The layout of the data entry forms are pretty basic, though they can be jazzed up manually by editing the HTML templates.

PHP Generator Data Entry Form

PHP Generator Data Entry Form

Code / Application Structure

The applications generated by PHP Generator take the format of having 1 page per table/view/query which contain an object oriented class to build the page.

The core code seems pretty robust and uses standard design patterns such as Factory pattern. It uses descriptive Method, Property and Class names which I like, however I still felt that some of the code may be a little bit too cryptic for anyone who is new to PHP, especially as there seems to be very little in the way of comments in the code. Of course, many people are using a code generator for a basic project because they don’t want to learn PHP.

The code takes advantage of a number of open source libraries such as Smarty (for templating) JQuery (for advanced JavaScript) FPDF (to generate PDF documents) Dynarch Calendar (Calendar component) etc.

I tend to prefer the use of standard libraries since we know that they have been well tested by a large community of users, and even if you have never used Smarty or JQuery for example, if you do web development for long enough then you are likely to encounter them again – so time spent learning how to work with them is never wasted.


Here we have a very capable program with a basic but functional user interface. It generates decent quality web applications and offers reasonable flexibility, and it’s FREE!

However, bare in mind that if you require what have become fairly standard features of modern PHP code generators – e.g. HTML editors, Autocomplete fields, and even PDO then you will require a full license – so if you do require ANY of the missing features then remember to take that into account when you are comparing PHP Generator for MySQL with other products that don’t have a free version but come with these features as standard.

But if you just need a basic web interface to your database and can live without the bells and whistles then you can’t go far wrong with the Free version, and of course you can always upgrade in the future if you realise you really can’t live without them!

Reviewed September 2011

PHP Generator Publisher's Website

If you have used this product and have any comments about this review (perhaps we missed a killer feature, or missed some major hole that only manifests itself after prolonged use) then please comment below.

comments powered by Disqus