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

Subscribe to our news:
Partners
Testimonials
Olivier Auverlot: "At my work (a universitary computer research laboratory), I'm alone to create all applications and databases. I don't know how I could do all the work without it. It's really a very productive software. I can focus on the database schemas and create quickly the user applications with a minimal amount of code to maintain".
John Gondek: "Your software is amazing. I consider myself a novice at PHP and JS and with your software I have a web page that is truly fantastic. Thank you so much ".

More

Add your opinion

PostgreSQL PHP Generator 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