Open Source Content Management Framework

PHP midgard_collector method execute

  1. Example

Executes SQL query for collector's instance.

bool execute(void);

midgard_collector method execute takes no parameter.

Unlike midgard_query_builder method, this one returns TRUE if SQL query has been executed and returned data has been set as collector's collection.

Cases to return FALSE:

  • There is no key set for collector
  • There is no at least one value added to collector
  • There is no data to assign as collector's collection

Example

<?php 

$mc = new midgard_collector("midgard_element", "style", $id);
$mc->set_key_property("name");
$mc->add_value_property("value");

$mc->execute();

?>
Designed by Nemein, hosted by Anykey