object->ds->...
Note: This syntax is retained for compatibility reasons.
This property contains a reference to the data source associated with the given object. This data source can be used to perform additional queries and to access query results.
The properties of the ds object (SQL, CountSQL, Where, Order) can be changed in the Events code so that the programmer can alter the properties conditionally (e.g. change the SQL query used to retrieve ListBox object's elements).
A programmer can instantiate a new ds object by constructing a connection object. Additional queries on this object can be performed in the events code, or the ds object's reference can be passed as the connection reference parameter to CCDLookUp function.
$db = new clsDB<connection_name>(); $db->query("SELECT article_id,article_title FROM articles"); $articles = array(); while ($db->next_record()) { $a = array(); $a["article_id"] = $db->f("article_id"); $a["article_title"] = $db->f("article_title"); $articles[] = $a; }where <connection_name> is the name of the connection, e.g. for "Intranet" connection the first line of the example should read:
$db = new clsDBIntranet();