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

Subscribe to our news:
Partners
Testimonials
Gabriela Arsene: "MySQL PHP Generator is really excellent! A very useful, easy to use tool and above all it is free, saving a lot of time and money to a developer! Great job! Congratulations to all the people who work at this project".
Ananda Theerthan J: "I have been looking for PHP generator for years and now I am happy that I found one. Yes, its the PHP generator for MySQL. I completely rate 10/10 for this product for making life easier. It has lot of features and capabilities especially the CRUD, lookups and data partitioning. I love this product and recommend to others".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

OnBeforeDeleteRecord

This event occurs when the Delete command is executed, and before the actual deletion.

 

Signature:

function OnBeforeDeleteRecord ($page, &$rowData, &$cancel,  &$message, 

       &$messageDisplayTime, $tableName)

 

Parameters:

$page

An instance of the Page class declared in components/page.php.

$rowData

The associative array of values that corresponds to the currently processed row.

$cancel

The value indicating whether the operation should be canceled.

$message

The message string that is displayed after the operation is completed (or canceled).

$messageDisplayTime

A time interval (in seconds) after which the message will disappear automatically. Default value is 0 (the message will not disappear).

$tableName

The name of processed table.

 

Example 1:

if (!(allowDataEditing())) {

  $cancel = true;

  $message = 'The application is running in read-only mode.';

}

 

See also: OnBeforeUpdateRecord, OnBeforeInsertRecord, OnAfterDeleteRecord.



Prev Return to chapter overview Next