Exemplo n.º 1
0
 protected function CheckOldEntrances()
 {
     $conn = new MysqlConection();
     $result = $conn->RawQuery("call ProcGetOldEntrace()");
     if (count($result) >= 1) {
         foreach ($result as $key => $value) {
             parent::Delete("sales_entradas", "id_entrada LIKE " . $value['id_entrada']);
         }
     }
 }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
 }
Exemplo n.º 3
0
 public function FindTask($query)
 {
     return parent::RawQuery($query, PDO::FETCH_CLASS);
 }
Exemplo n.º 4
0
 function __construct($conect_dsn = array(), $directory = null)
 {
     parent::__construct($conect_dsn, $directory);
 }
Exemplo n.º 5
0
 public function MysqlInstallTables()
 {
     $mysql_table = "";
     parent::beginTransaction();
     if (count($this->table_key_error) >= 1) {
         foreach ($this->tables as $key => $value) {
             $flag = false;
             for ($i = 0; $i < count($this->table_key_error); $i++) {
                 if ($key == $this->table_key_error[$i]) {
                     $flag = true;
                     break;
                 }
             }
             if (!$flag) {
                 $mysql_table = "CREATE TABLE " . $value[TABLE_NAME] . " (" . implode(",", $value[TABLE_VALUE]) . "); ";
                 parent::exec($mysql_table);
             }
         }
     } else {
         foreach ($this->tables as $key => $value) {
             $mysql_table .= "CREATE TABLE " . $value[TABLE_NAME] . " (" . implode(",", $value[TABLE_VALUE]) . "); ";
         }
         parent::exec($mysql_table);
     }
     parent::commit();
 }
Exemplo n.º 6
0
 public static function get_paises()
 {
     $mysql = new MysqlConection();
     return $paises = $mysql->RawQuery("SELECT PAI_PK  as id , PAI_NOMBRE as nombre FROM pais");
 }
Exemplo n.º 7
0
<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
include '/Conf/Include.php';
$conn = new MysqlConection();
$values = $conn->GetformatQuery("select * from datos");
$values = $conn->RawQuery("select * from datos", PDO::FETCH_ASSOC);
$values = $conn->Query("select * from datos");
echo "<pre>";
print_r($values);
echo "</pre>";
$find = $conn->Find("datos", "Id = 8", array("Nombre" => "name", "valor" => "value"));
echo "<br><br><br><pre>";
print_r($find);
echo "</pre>";
Exemplo n.º 8
0
 public function SetDashboard($section, $icon, $link, $title, $start_index, $priv)
 {
     $mysql = new MysqlConection();
     $mysql->Insert("dashboard", array("id_seccion" => $section, "icono" => $icon, "link" => $link, "titulo" => $title, "start" => $start_index, "privilegios" => $priv));
 }
Exemplo n.º 9
0
 public function get_login()
 {
     $this->QUERY = "SELECT * FROM login WHERE id_usuario LIKE '{$this->ID_USER}'";
     $data = parent::RawQuery($this->QUERY);
     return $data[0];
 }