本文整理汇总了PHP中MySQL::sql_query方法的典型用法代码示例。如果您正苦于以下问题:PHP MySQL::sql_query方法的具体用法?PHP MySQL::sql_query怎么用?PHP MySQL::sql_query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MySQL
的用法示例。
在下文中一共展示了MySQL::sql_query方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: inicializar
function inicializar()
{
$db = new MySQL();
$sql = "";
$consulta = $db->sql_query($sql);
$db->sql_close();
}
示例2: inicializar
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();
}
示例3: consultar
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;
}
示例4: consultar
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;
}
示例5: consultar
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;
}
示例6: consultar
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;
}
示例7: consultar
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;
}
示例8: obtenerTerceros
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;
}
示例9: init_mysql
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'");
}
示例10: VALUES
$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