Exemplo n.º 1
0
 /**
  * createDate
  * static version of getCreateDate
  * @see getCreateDate
  */
 function createDate($tablename, $primary_key_value = 0)
 {
     $q = new sqlQuery($GLOBALS['conx']);
     if (is_object($tablename)) {
         $actual_tablename = $tablename->getTable();
         $primary_key_value = $tablename->getPrimaryKeyValue();
     } else {
         $actual_tablename = $tablename;
     }
     $q->query("SELECT created_date FROM `" . $this->getTable() . "` WHERE \n                   `table_name`='" . $q->quote($actual_tablename) . "' AND \n                   `id`='" . $q->quote($primary_key_value) . "'");
     if ($q->getNumRows() > 0) {
         return $q->getData("created_date");
     } else {
         return false;
     }
     $q->free();
 }