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

Subscribe to our news:
Partners
Testimonials
Lucian Nedescu: "Thank you very much. Have a nice century (this is a real wish :P). I think that i will do a great job on my clients database with the new php interface. Thank You again".
Charles Phillips: "Just want to take a second to really thank you for all the great support you give – I think that’s by far the best feature you offer".

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