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

Subscribe to our news:
Partners
Testimonials
Simon Greener: "A lot of work went in to designing our application database. PHP Generator allowed us to build a fully functional, professional looking, and functionally powerful web application from that database. It has freed us from worrying about low level code, enabling us to focus on the business requirements of the customer. The support provided is excellent with staff quickly producing answers to questions ranging from newbie to simple or complex. I highly recommend the product".
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

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