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

Subscribe to our news:
Partners
Testimonials
Johnson Sieu: "Your PHP Generator is the BEST that I have used so far. It is affordable and user-friendly. Congratulation for coming up with such a fine product. I will not hesitate to introduce it to my peers".
Svetlio Mitev: "I am really sure that you guys can make the best PHP code generators to be found worldwide".

More

Add your opinion

SQLite 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