PHP Generator 14.10.0.3 released
Dec 11, 2014
Prev | Next |
SQL Maestro Group is happy to announce the next minor update of PHP Generator 14.10.0.3, a GUI frontend that allows you to generate high-quality PHP scripts for the selected tables, views and queries for the further working with these objects through the web. There are versions for MySQL, MS SQL Server, PostgreSQL, Oracle, SQLite, Firebird, DB2, SQL Anywhere and MaxDB. |
Please find below a detailed description of the most interesting features added in this version. Other new features, corrections, and fixes can be found in the Changelog.
- The External audio file option becomes available in the View properties. This allows you to use the standard HTML5 audio player for your application. To utilize another audio player (there are lots of free and commercial ones in the Internet), use the OnCustomRenderColumn event.
-
The OnPreparePage page-level event has been added. This piece of code is a method of the Page class that is called at the end of the constructor. It allows you to customize all members of the class, for example, add an additional filter to the dataset.
The following event handler is used in our new demo application:
Function applyDatasetFilter is defined in the schema_browser_utils.php file as follows:Listing 1. OnBeforeInsertRecord event exampleapplyDatasetFilter($this->dataset);
Listing 2. The applyDatasetFilter functionfunction applyDatasetFilter(Dataset $dataset) { if (GetApplication()->IsGETValueSet('database')) $value = GetApplication()->GetGETValue('database'); else $value = ArrayUtils::GetArrayValueDef($_COOKIE, 'database'); if (StringUtils::IsNullOrEmpty($value)) { $globalConnectionOptions = GetGlobalConnectionOptions(); $value = $globalConnectionOptions['database']; } if (!StringUtils::IsNullOrEmpty($value)) { $dataset->AddFieldFilter('Database_name', new FieldFilter($value, '=')); setcookie('database', $value); } }
- The OnBeforePageExecute event becomes available at the application level. This helps you to define a snapshot of PHP code that will be included into all the pages.
- The SpinEdit control was replaced to one from HTML5.
- The Step property has been added to the Range control.
- Lookup filter condition is now applied to Filter Row and Filter Builder tools.
- Date and datetime controls in Filter Row and Filter Builder now display values in the same format which is used in the corresponding Data Grid columns.
-
Values of date and datetime fields used in the data manipulation events (which are instances of the SMDateTime class) now can be converted to strings automatically.
Listing 3. OnBeforeInsertRecord event example
$str = $rowData['date_field']; // $str now contains the string representation of the date in Y-m-d format (e.g. 2014-12-15).
-
JavaScript API: the getCaption() function added to Combobox and RadioGroup editors.
Assume that we have a RadioGroup editor with the following properties:
... and the second item is selected: The code below shows the difference between getValue() and getCaption() functions:Listing 4. getValue() and getCaption() examplevar value = editors['color'].getValue(); // value == 2 var caption = editors['color'].getCaption(); // caption == 'yellow'
For more information about a specific tool see the appropriate page:>
PHP Generator for MySQL | PostgreSQL PHP Generator | ||
MS SQL PHP Generator | Oracle PHP Generator | ||
Firebird PHP Generator | SQLite PHP Generator | ||
DB2 PHP Generator | MaxDB PHP Generator | ||
ASA PHP Generator |
Prev | Next |