当前位置: 首页>>代码示例>>PHP>>正文


PHP MySQL::sql_query方法代码示例

本文整理汇总了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();
 }
开发者ID:TechnoSoluciones,项目名称:B2C,代码行数:7,代码来源:Usuarios_Roles.class.php

示例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();
 }
开发者ID:jalvaran,项目名称:B2C,代码行数:7,代码来源:Usuarios_Usuarios.class.php

示例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;
 }
开发者ID:jalvaran,项目名称:B2C,代码行数:9,代码来源:Usuarios_Representantes.class.php

示例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;
 }
开发者ID:TechnoSoluciones,项目名称:B2C,代码行数:9,代码来源:CCV_Datos.class.php

示例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;
 }
开发者ID:jalexiscv,项目名称:etc-Vigilancia,代码行数:9,代码来源:Equipos.class.php

示例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;
 }
开发者ID:TechnoSoluciones,项目名称:B2C,代码行数:9,代码来源:Aplicacion_Modulos.class.php

示例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;
 }
开发者ID:jalvaran,项目名称:B2C,代码行数:9,代码来源:Usuarios_Politicas.class.php

示例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;
}
开发者ID:jalexiscv,项目名称:etc-Vigilancia,代码行数:11,代码来源:Demo.php

示例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'");
}
开发者ID:Razinsky,项目名称:echaude-com,代码行数:13,代码来源:loc.init_public.php

示例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 
开发者ID:hkirk,项目名称:f1,代码行数:31,代码来源:index.php


注:本文中的MySQL::sql_query方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。