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

Subscribe to our news:
Partners
Testimonials
Dave Lantz: "I have to say that I simple love this product and its ease of use. I know that I have only tapped into about 20% of what it can do. In my business I come into a lot of contact with developers and I tell them all, that if they need an easy way to connect, report or work their databases they MUST check out your products".
Mike Little: "Great product, thank you for your great work and sharing".

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