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

Subscribe to our news:
Partners
Testimonials
Javlon: "Beautifully done. This is a stunning software,it creates the pages in no time. Thank you for your hard efforts in creating this software".
George Westrup: "I have saved so much time using your products. Also you are quick to respond to every question I have had. Thanks for the great support".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

OnCustomCompareValues

This event allows you to define your own function for value comparison. Live example and video tutorial.

 

Signature:

function OnCustomCompareValues($columnName, $valueA, $valueB, &$result)

 

Parameters:

$columnName

The name of currently processed column.

$valueA

The first value to compare.

$valueB

The second value to compare.

$result

The result of the comparison. Should be set to 0 if values are equal and to a non-zero value otherwise.

 

Example

This example shows how to define an algorithm that considers two values to be equal if their difference is less than or equal to 0.5.

 

if (in_array($columnName, array('height', 'length', 'width'))) {

    $result = abs($valueA - $valueB) <= 0.5;

}

 

The example can be seen in action in our Feature Demo.



Prev Return to chapter overview Next