Choose your database:
MS SQL Server
SQL Anywhere

Subscribe to our news:
Ran / Cole: "We bought the tool last week and want to say how much we love it. We've found it not only powerful, but very user friendly. We have used the tool to create an interface that manages our MySQL DB for different types of users".
Grey: "We're a two-person company, it's just me an my wife. I'm the technical guru, and she handles the business operations. I have to know a lot about MySQL, but that's much too technical for her. I have frequently had to setup CGI scripts (I code in Perl) so she can manage some of our tables (suppliers, manufacturers, etc).

I discovered PHP Generator a couple of days ago, tried the free version,and within a few hours I had purchased the Pro version (as well as SQL Maestro for MySQL).

Today I am completing the conversion of the last of my custom table managers to PHP Generator. This is eliminating several thousand lines of code that I don't have to support any more!

Thanks for this fantastic product".


Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next


This event allows you to provide a custom default value for a column in the Insert form. Use this event if you need to provide a non-trivial default value for a column (for example, retrieve something from the database or calculate something with PHP code). Live examples.



function OnCustomDefaultValues($page, &$values, &$handled)




An instance of the Page class.


An associative array of default values


A parameter to indicate whether custom default values should be applied. Set $handled to true to apply the changes.



This example shows how to provide the release_date column with the default value "a week later".


$release_date = SMDateTime::now();


$values['release_date'] = $release_date;  

$handled = true;

Prev Return to chapter overview Next