function inicializar() { $db = new MySQL(); $sql = ""; $consulta = $db->sql_query($sql); $db->sql_close(); }
function inicializar() { $db = new MySQL(); $sql = "create table " . $this->tabla . "(" . "usuario integer(10) not null," . "alias varchar(128) not null," . "clave varchar(128) not null," . "fecha date not null," . "hora time not null," . "estado varchar(32) not null," . "primary key (usuario)" . ");"; $consulta = $db->sql_query($sql); $db->sql_close(); }
function consultar($usuario) { $db = new MySQL(); $sql = "SELECT * FROM `" . $configuracion["empresa"] . "_usuarios_representantes` " . "WHERE `usuario`='" . $usuario . "';"; $consulta = $db->sql_query($sql); $fila = $db->sql_fetchrow($consulta); $db->sql_close(); return $fila; }
function consultar($dato) { $db = new MySQL(); $sql = "SELECT * FROM `" . $configuracion["empresa"] . "_ccv_datos` " . "WHERE `dato`='" . $dato . "';"; $consulta = $db->sql_query($sql); $fila = $db->sql_fetchrow($consulta); $db->sql_close(); return $fila; }
function consultar($id) { $db = new MySQL(); $sql = "SELECT * FROM `equipos` " . "WHERE `id`='" . $id . "';"; $consulta = $db->sql_query($sql); $fila = $db->sql_fetchrow($consulta); $db->sql_close(); return $fila; }
function consultar($modulo) { $db = new MySQL(); $sql = "SELECT * FROM `" . $configuracion["empresa"] . "_aplicacion_modulos` " . "WHERE `modulo`='" . $modulo . "';"; $consulta = $db->sql_query($sql); $fila = $db->sql_fetchrow($consulta); $db->sql_close(); return $fila; }
function consultar($rol) { $db = new MySQL(); $sql = "SELECT * FROM `" . $configuracion["empresa"] . "_politicas` " . "WHERE `rol`='" . $rol . "';"; $consulta = $db->sql_query($sql); $fila = $db->sql_fetchrow($consulta); $db->sql_close(); return $fila; }
function obtenerTerceros($centro) { $db = new MySQL(); $sql = "SELECT * FROM `rondas`.`personal` WHERE `centro`='" . $centro . "';"; $consulta = $db->sql_query($sql); while ($row = $db->sql_fetchrow($consulta)) { array_push($rows, $row); } $db->sql_close(); return $rows; }
function init_mysql() { global $mysql; //Variables de connexion $mysql = new MySQL(); $mysql->hostname = DB_HOSTNAME; $mysql->bduser = DB_USER; $mysql->bdpassword = DB_PASSWORD; $mysql->bdname = DB_NAME; $mysql->connect_db(); $mysql->select_db(); $mysql->sql_query("SET NAMES 'utf8'"); }
$year = 2011; $sql = ""; $message = ""; $validateTime = false; if (isset($_POST['time'])) { $time = F1Helper::parseTimeString($_POST['time']); if ($time == -1) { $message = "Time format m:ss.tht"; } else { $validateTime = true; } } if ($validateTime && isset($_POST['name'])) { $error = false; $sql = "INSERT INTO f1_track_times VALUES ('', '" . $_POST['track'] . "', '" . $_POST['type'] . "', '" . $_POST['tyre'] . "', '" . $_POST['car'] . "', '" . $_POST['name'] . "', '" . $time . "', " . time() . ", '" . $year . "'" . ")"; $result = $db->sql_query($sql); if (!$result) { $error = true; } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>F1 Data</title> </head> <body> <div class="input"> <h1>Report lap time</h1><br /><br /> <?php