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


PHP MysqliDb::get方法代码示例

本文整理汇总了PHP中MysqliDb::get方法的典型用法代码示例。如果您正苦于以下问题:PHP MysqliDb::get方法的具体用法?PHP MysqliDb::get怎么用?PHP MysqliDb::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MysqliDb的用法示例。


在下文中一共展示了MysqliDb::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GET

 function GET()
 {
     $db = new MysqliDb($this->config["host"], $this->config["user"], $this->config["pass"], $this->config["base"]);
     $results = $db->get('VIP');
     if (!empty($results) && count($results) > 0) {
         SimplestView::render('index', array("results" => $results));
     }
 }
开发者ID:rittme,项目名称:Voicela,代码行数:8,代码来源:Home.php

示例2: get

    $function = $_GET["function"];
    if ($function == 'get') {
        get();
    }
}
function get()
{
    $db = new MysqliDb();
    $results = $db->rawQuery('select oferta_laboral_id, DATE_FORMAT(fecha,"%d-%m-%Y") fecha, titulo, detalle, cliente_id, status, 0 cliente from ofertas_laborales order by oferta_laboral_id desc');
    foreach ($results as $key => $row) {
        $db->where('cliente_id', $row["cliente_id"]);
开发者ID:arielcessario,项目名称:uiglp,代码行数:11,代码来源:ofertas_laborales.php

示例3: getSlider

function getSlider($conProductos)
{
    $db = new MysqliDb();
    //    $results = $db->get('sliders');
    //    $results = $db->rawQuery('Select slider_id, o.producto_id producto_id, kit_id, precio, o.descripcion descripcion,
    //    imagen, titulo, p.nombre producto from sliders o inner join productos p on o.producto_id = p.producto_id;');
    $results = $db->rawQuery('Select oferta_id slider_id, o.producto_id producto_id, kit_id, precio, o.descripcion descripcion,
    imagen, titulo, 0 producto from ofertas o;');
    if ($conProductos) {
        foreach ($results as $key => $row) {
            $db->where('producto_id', $row["producto_id"]);
            $producto = $db->get('productos');
            $results[$key]["producto"] = $producto;
        }
    }
    echo json_encode($results);
}
开发者ID:arielcessario,项目名称:ac-angular-slider-manager,代码行数:17,代码来源:slider-manager.php

示例4: get

 /**
 * Fetch all objects
 *
 * @access public
 * @param integer|array $limit Array to define SQL limit in format Array ($count, $offset)
                               or only $count
 * @param array|string $fields Array or coma separated list of fields to fetch
 *
 * @return array Array of dbObjects
 */
 private function get($limit = null, $fields = null)
 {
     $objects = array();
     $results = $this->db->get($this->dbTable, $limit, $fields);
     foreach ($results as &$r) {
         $this->processArrays($r);
         $this->processWith($r);
         if ($this->returnType == 'Object') {
             $item = new static($r);
             $item->isNew = false;
             $objects[] = $item;
         }
     }
     if ($this->returnType == 'Object') {
         return $objects;
     }
     return $results;
 }
开发者ID:TwistItLabs,项目名称:website,代码行数:28,代码来源:dbObject.php

示例5: sendMessageToAll

/**
 * send message to all users
 * @param $text
 * @param $chatid
 * @param $status
 * @param MysqliDb $db
 * @param TelegramBot\Api\BotApi $bot
 */
function sendMessageToAll($text = null, $chatid, $status, $db, $bot)
{
    //this is use for hide confirm keyboard
    $hideKeys = new \TelegramBot\Api\Types\ReplyKeyboardHide(true);
    if ($status == 1) {
        //confirm keyboard
        $keys = new \TelegramBot\Api\Types\ReplyKeyboardMarkup(array(array("بله", "خیر")), false, true, true);
        if ($text == null) {
            //admin is going to send next message and next message stored
            $db->orderBy('ID', 'DESC');
            $q = $db->getOne('nextMessages', array('text'));
            $text = $q['text'];
        }
        $db->update('adminOperations', array('message' => $text));
        $status = 2;
        //admin get confirm
        $msg = "پیام زیر برای همه کاربران ارسال خواهد شد. آیا برای ارسال پیامها اطمینان دارید؟\n\n";
        $msg .= $text;
        $bot->sendMessage($chatid, $msg, true, null, $keys);
    } elseif ($status == 2 && $text == 'بله') {
        //get all user and send message for them
        $users = $db->get('users');
        $db->orderBy('ID', 'DESC');
        //custom message and next message temporary stored in adminOperations table
        $q = $db->getOne('adminOperations', array('message'));
        $message = $q['message'];
        foreach ($users as $user) {
            try {
                $bot->sendMessage($user['ID'], $message);
            } catch (Exception $e) {
                error_log($e->getMessage());
            }
        }
        $bot->sendMessage($chatid, 'پیام مورد نظر ارسال شد', true, null, $hideKeys);
        $status = 0;
    } else {
        $bot->sendMessage($chatid, 'ارسال پیام لغو شد', true, null, $hideKeys);
        $status = 0;
    }
    $db->update('adminOperations', array('send_status' => $status));
}
开发者ID:hoseinBL,项目名称:SoftwareTalks,代码行数:49,代码来源:functions.php

示例6: getPedidosDetalles

/**
 * @descr Obtiene las pedidodetalles
 */
function getPedidosDetalles($pedido_id)
{
    $db = new MysqliDb();
    $db->where('pedido_id', $pedido_id);
    $results = $db->get('pedidos_detalles');
    echo json_encode($results);
}
开发者ID:arielcessario,项目名称:ac-angular-stocks,代码行数:10,代码来源:ac-stocks.php

示例7: getNoticias

function getNoticias()
{
    $db = new MysqliDb();
    $results = $db->rawQuery('Select noticia_id, titulo, detalles, fecha, creador_id, vistas, tipo, 0 fotos, 0 comentarios from noticias;');
    foreach ($results as $key => $row) {
        $db->where('noticia_id', $row["noticia_id"]);
        $fotos = $db->get('noticias_fotos');
        $results[$key]["fotos"] = $fotos;
        $db->where('noticia_id', $row["noticia_id"]);
        $comentarios = $db->get('noticias_comentarios');
        $results[$key]["comentarios"] = $comentarios;
    }
    echo json_encode($results);
}
开发者ID:arielcessario,项目名称:ac-angular-noticias,代码行数:14,代码来源:noticias.php

示例8: header

/**
 * @Author: ananayarora
 * @Date:   2016-01-14 20:08:08
 * @Last Modified by:   ananayarora
 * @Last Modified time: 2016-01-14 23:41:31
 */
if (!isset($_GET['id'])) {
    header("Location: index.php");
}
require 'header.php';
require 'conf.php';
require 'sql.php';
$c = new Conf();
$o = new MysqliDb($c->host, $c->username, $c->password, $c->db);
$o->where("id", $o->escape($_GET['id']));
$k = $o->get("startups");
?>
<center>
	<div class="main_startup">
		<div style='background-image:url("<?php 
echo $k[0]['imageurl'];
?>
");' class="startup_photo"></div>
		<div class="startup_details">
			<h3 class="startup_name"><?php 
echo $k[0]['name'];
?>
</h3>
			<p class="oneliner"><?php 
echo $k[0]['oneliner'];
?>
开发者ID:ananay,项目名称:seedup,代码行数:31,代码来源:view-startup.php

示例9: getUserReport

 public function getUserReport($uid)
 {
     $db = new MysqliDb(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
     $db->where('uid', $uid);
     $db->orderBy("id", "Desc");
     $result = $db->get("activities");
     return $result;
 }
开发者ID:jmayfiel,项目名称:prescriptiontrails,代码行数:8,代码来源:db.php

示例10: Conf

	<main class="mdl-layout__content">
		<div class="discover">
			<h1 class="discover-text">Discover</h1>
		</div>
		<div class="main-section">
			<center>
				
			</center>

			<?php 
require 'conf.php';
require 'sql.php';
$c = new Conf();
$o = new MysqliDb($c->host, $c->username, $c->password, $c->db);
$o->orderBy('timeadded', 'desc');
$k = $o->get('startups', 20);
foreach ($k as $key => $value) {
    ?>

			<div class="mdl-card mdl-shadow--2dp startup-card">
			  <div class="mdl-card__title mdl-card--expand startup-image" style="background-image:url('<?php 
    echo $value['imageurl'];
    ?>
');">
			  	<div class="startup-overlay"></div>
			    <h2 class="mdl-card__title-text startup-name"><?php 
    echo $value['name'];
    ?>
</h2>
			  </div>
			  <div class="mdl-card__supporting-text">
开发者ID:ananay,项目名称:seedup,代码行数:31,代码来源:discover.php

示例11: Encryption

     break;
 case 'getContract':
     $encrypt = new Encryption();
     $id = $encrypt->decode($_GET['id']);
     $db = new MysqliDb();
     $db->where('id', $id);
     $contracts = $db->getOne('contracts');
     echo json_encode($contracts);
     break;
 case 'getContractByClient':
     $encrypt = new Encryption();
     $id = $encrypt->decode($_GET['id']);
     $db = new MysqliDb();
     $db->where('id', $id);
     $cols = array("id", "ignitor_name", "ignitor_title", "client", "ignitor_email", "client_name", "client_title", "client_company", "client_name is not null as registed");
     $contracts = $db->get('contracts', null, $cols);
     echo json_encode($contracts);
     break;
 case 'saveToHistory':
     $db = new MysqliDb();
     //$db->where('id',$_GET['id']);
     $data = array('doc_id' => $_POST['index'], 'contract_id' => $_POST['id'], 'content' => $_POST['content'], 'date' => date('Y-m-d H:i:s'));
     $id = $db->insert('history', $data);
     break;
 case 'getContractContent':
     $db = new MysqliDb();
     $db->where('id', $_GET['id']);
     $contracts = $db->getOne('contracts');
     echo json_encode($contracts);
     break;
 case 'getHistory':
开发者ID:aanyun,项目名称:online-contract-signing,代码行数:31,代码来源:API.php

示例12: die

if (!$setup['db_host'] || !$setup['db_user'] || !$setup['db_pswd'] || !$setup['db_name']) {
    die('Holy hole in the plot, Batman! Joker\'s made a laugh of the config file!');
}
// MySQLi wrapper
require_once '../_system/MysqliDb.php';
$db = new MysqliDb($setup['db_host'], $setup['db_user'], $setup['db_pswd'], $setup['db_name']);
$db->setPrefix('grlx_');
// Grawlix db class
$db_ops = new GrlxDbOps($db);
// echo '<pre>$_SESSION|';print_r($_SESSION);echo '|</pre>';
/* ! Check security * * * * * * * */
if (!$except) {
    if (!$_SESSION['admin']) {
        header('location:panl.login.php?ref=' . $_SERVER['REQUEST_URI']);
        die('no session');
    } else {
        $maybe_serial = $_SESSION['admin'];
        $query = "SELECT id FROM user WHERE serial = '{$maybe_serial}'";
        $db->where('serial', $maybe_serial);
        $result = $db->get('user', null, 'id');
        $maybe_admin = $result[0];
    }
    if (!$maybe_admin) {
        header('location:panl.login.php');
        die($query);
    }
}
$frequency_list_init = display_pretty_publish_frequency();
// Get vital milieu data
$milieu_list = get_site_milieu($db);
header("Content-Type: text/html; charset=utf-8");
开发者ID:UTSquishy,项目名称:Grawlix-Repository,代码行数:31,代码来源:panl.init.php

示例13: MysqliDb

require_once 'constantes.php';
$bd = new MysqliDb(SERVER_DB_URL, SERVER_DB_USUARIO, SERVER_DB_PASS, SERVER_DB_NOMBRE);
if (!$bd->ping()) {
    $bd->connect();
}
if ($_SERVER["REQUEST_METHOD"] == REQUEST_METODO_POST) {
    $postdata = json_decode(file_get_contents('php://input'));
    $usuario_form = $postdata->usuario;
    $pass_form = md5($postdata->pass);
    $bd->where(COLUMNA_EMAIL, $usuario_form);
    $bd->where(COLUMNA_PASS, $pass_form);
    if ($bd->has(TABLA_USUARIO)) {
        // CORRECTO
        $accion_form = $postdata->form_accion;
        if ($accion_form == ACCION_OBTENER) {
            $query = $bd->get(TABLA_PRODUCTO);
            foreach ($query as $parametro_key => $parametro_valor) {
                // AGREGOS LAS CATEGORIAS A LA QUE PERTENECE CADA PRODUCTO
                $bd->where(COLUMNA_ID_PRODUCTO, $parametro_valor[COLUMNA_ID_M]);
                $referencias = $bd->get(TABLA_REL_PRODUCTO_CATEGORIA);
                $parametro_valor[VALOR_CATEGORIAS] = $referencias;
                $query[$parametro_key] = $parametro_valor;
            }
            $arr = array(RESPUESTA_DATA => $query, RESPUESTA_MENSAJE => MENSAJE_OK, RESPUESTA_ERROR => ERROR_NINGUNO);
        } else {
            if ($accion_form == ACCION_AGREGAR) {
                $data_post = $postdata->form_data;
                if (!isset($data_post->FOTO)) {
                    $data_post->FOTO = NULL;
                }
                $datos = array(COLUMNA_NOMBRE => $data_post->NOMBRE, COLUMNA_DESCRIPCION => $data_post->DESCRIPCION, COLUMNA_ESTADO => $data_post->ESTADO, COLUMNA_FOTO => $data_post->FOTO, COLUMNA_MUESTRA_FULLSCREEN => $data_post->MUESTRA_FULLSCREEN, COLUMNA_MUESTRA_PRECIO => $data_post->MUESTRA_PRECIO);
开发者ID:josue270193,项目名称:Catalogo,代码行数:31,代码来源:producto.php

示例14: MysqliDb

require_once 'constantes.php';
$bd = new MysqliDb(SERVER_DB_URL, SERVER_DB_USUARIO, SERVER_DB_PASS, SERVER_DB_NOMBRE);
if (!$bd->ping()) {
    $bd->connect();
}
if ($_SERVER['REQUEST_METHOD'] == REQUEST_METODO_POST) {
    $postdata = json_decode(file_get_contents('php://input'));
    $usuario_form = $postdata->usuario;
    $pass_form = md5($postdata->pass);
    $bd->where(COLUMNA_EMAIL, $usuario_form);
    $bd->where(COLUMNA_PASS, $pass_form);
    if ($bd->has(TABLA_USUARIO)) {
        // CORRECTO
        $accion_form = $postdata->form_accion;
        if ($accion_form == ACCION_OBTENER) {
            $query = $bd->get(TABLA_CATEGORIA);
            $arr = array(RESPUESTA_DATA => $query, RESPUESTA_MENSAJE => MENSAJE_OK, RESPUESTA_ERROR => ERROR_NINGUNO);
        } else {
            if ($accion_form == ACCION_OBTERNER_POR_ID) {
                $parametros = $postdata->form_parametros;
                foreach ($parametros as $parametro_key => $parametro_valor) {
                    //        var_dump($parametro_key);
                    //        var_dump($parametro_valor);
                    foreach ($parametro_valor as $key => $val) {
                        //          var_dump($key);
                        //          var_dump($val);
                        switch ($key) {
                            case PARAMETRO_ID:
                                $bd->where(COLUMNA_ID, (int) $val);
                                break;
                        }
开发者ID:josue270193,项目名称:Catalogo,代码行数:31,代码来源:categoria.php

示例15: changePassword

function changePassword($cliente_id, $pass_old, $pass_new)
{
    $db = new MysqliDb();
    $db->where('cliente_id', $cliente_id);
    $results = $db->get("clientes");
    if ($db->count > 0) {
        $result = $results[0];
        $options = ['cost' => 12];
        $password = password_hash($pass_new, PASSWORD_BCRYPT, $options);
        $db->where('cliente_id', $cliente_id);
        $data = array('password' => $password);
        if ($db->update('clientes', $data)) {
            echo json_encode(1);
        } else {
            echo json_encode(-1);
        }
    } else {
        echo json_encode(-1);
    }
}
开发者ID:arielcessario,项目名称:hydrox-css,代码行数:20,代码来源:cliente.php


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