CodeCharge Studio

DataSource->RecordsCount Run-Time Property (PHP)

Applies to

DataSource Object

Type

number

Access

read/write

Syntax

object->DataSource->RecordsCount [=Value]

Description

Contains the number of records retrieved by DataSource's SELECT SQL query.

Examples

The following example shows how to hide a form if there are no records retrieved from the database.
global $items;
if ($items->DataSource->RecordsCount == 0)
{
  $items->Visible = false;
}
where $items is the name of the form.

Other examples

Hiding a Grid If No Records are Found

See Also

DataSource Property
DataSource->SQL Property
DataSource->CountSQL Property
DataSource->Where Property
DataSource->Order Property


On-line, printable versions and updates