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

Subscribe to our news:
Partners
Testimonials
Jonathan Oakes: "This is a lovely application. It's easy to hook into my own bespoke applications. It's very powerful, yet really quite simple to use. Thanks for this".
Ran Cole: "We bought the tool last week and want to say how much we love it. We've found it not only powerful, but very user friendly. We have used the tool to create an interface that manages our MySQL DB for different types of users".

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