Exemplo n.º 1
0
 /**
  * Estrae il record della transazione specificata
  * @param string $idtransazione: id transazione personalizzato
  * @return mixed NULL se non ha trovato nulla, oppure l'array con il record
  */
 private function getTransaction($idtransazione)
 {
     $q = "SELECT * FROM #__propay_transactions WHERE idtransazione='" . $this->db->escape($idtransazione) . "'";
     $list = $this->db->queryList($q);
     if (is_array($list) && count($list) > 0) {
         return $list[0];
     } else {
         return NULL;
     }
 }
Exemplo n.º 2
0
 private function buildCreateTableQuery()
 {
     $definition = array();
     foreach ($this->fields as $name => $def) {
         $definition[] = "`" . $name . "` " . $def;
     }
     if ($this->primarykey != "") {
         $definition[] = "PRIMARY KEY (`" . $this->primarykey . "`)";
     }
     foreach ($this->indexes as $name => $def) {
         $definition[] = $def;
     }
     $q = "CREATE TABLE `" . $this->name . "` (" . implode(", ", $definition) . ")";
     if ($this->comment != "") {
         $q .= " COMMENT='" . $this->db->escape($this->comment) . "'";
     }
     return $q;
 }