Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Ananda Theerthan J: "I have been looking for PHP generator for years and now I am happy that I found one. Yes, its the PHP generator for MySQL. I completely rate 10/10 for this product for making life easier. It has lot of features and capabilities especially the CRUD, lookups and data partitioning. I love this product and recommend to others".
Steven Langfield: "I wanted to drop you a mail to say how freaking AMAZING your software is. It will be the best £100 I have ever spent. I have still to read all your documentation to take full advantage but what you have created is truly amazing".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

OnGetFieldValue

This event occurs on displaying a value of a field. It allows you to replace the actual value of a field to your own.

 

Signature:

function OnGetFieldValue ($fieldName, &$value, $tableName)

 

Parameters:

$fieldName

The name of currently processed field.

$value

The actual value of the field. Can be changed to another value.

$tableName

The name of currently processed table.

 

Example

This example shows how this event can be used for implementing a very simple transparent encryption based on the str_rot13 PHP function.

 

if ($fieldName == 'private_data') {

    $value = str_rot13($value);

}

 

Since the call of this function for an encrypted expression returns the original string, we can define OnBeforeInsertRecord and OnBeforeUpdateRecord event handlers as follows:

 

$rowData['private_data'] = str_rot13($rowData['private_data']);

 

This is just an example. We would recommend that you use more cryptographically strong algorithms to encrypt your important data.



Prev Return to chapter overview Next