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


PHP MySQL::fetch_row方法代码示例

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


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

示例1: getData

function getData($name, $nombre1, $integrador, $producto)
{
    $dataArray = "";
    $fecha = date('H');
    $dia = date('d', strtotime("+1 day"));
    try {
        $conexion = new MySQL(0);
        $query0 = '	select hour(date_add(NOW(), INTERVAL -' . HOURDB . ' hour));';
        $result0 = $conexion->consulta($query0);
        $exec0 = $conexion->fetch_row($result0);
        $fecha = $exec0[0];
        $query = 'CALL GetProductChargeToday("' . strtolower($name) . '",' . HOURDB . "," . $integrador . ',' . $producto . ');';
        $result = $conexion->consulta($query);
        $conexion->prepareNextResult();
        $query1 = 'CALL GetProductChargeYesterday("' . strtolower($name) . '",' . HOURDB . "," . $integrador . ',' . $producto . ');';
        $result1 = $conexion->consulta($query1);
        $conexion->prepareNextResult();
        $query2 = 'CALL GetProductChargeProm("' . strtolower($name) . '",' . HOURDB . "," . $integrador . ',' . $producto . ');';
        $result2 = $conexion->consulta($query2);
        $conexion->prepareNextResult();
        if (!$result or !$result1 or !$result2) {
            throw new Exception("No se logro obtener informacion de cobros....\n");
        } else {
            $cont = 0;
            $hoy = $conexion->fetch_row($result);
            $ayer = $conexion->fetch_row($result1);
            $prom = $conexion->fetch_row($result2);
            while ($cont <= $fecha) {
                if ($ayer[1] == $cont) {
                    $valor = $ayer[0];
                    $ayer = $conexion->fetch_row($result1);
                } else {
                    $valor = 0;
                }
                if ($hoy[1] == $cont) {
                    $valor1 = $hoy[0];
                    $hoy = $conexion->fetch_row($result);
                } else {
                    $valor1 = 0;
                }
                if ($prom[0] == $cont) {
                    $valor2 = $prom[1];
                    $prom = $conexion->fetch_row($result2);
                } else {
                    $valor2 = 0;
                }
                $dataArray = $dataArray . "data1.addRow([" . $cont . ", " . $valor2 . "," . $valor . ", " . $valor1 . "]);\n";
                $cont++;
            }
        }
        $conexion->MySQLClose();
    } catch (Exception $e) {
        echo 'Excepcion capturada: ', $e->getMessage(), "\n";
    }
    return $dataArray;
}
开发者ID:C0l0ch0,项目名称:BPV_WAU,代码行数:56,代码来源:metricas_prod.php

示例2: getKeyAccess

 private function getKeyAccess($option)
 {
     switch ($option) {
         case 0:
         case 6:
             //$keyAccess = array("UserPweb","123456","localhost","billing");
             //$keyAccess = array("fox","123456","192.168.2.122","billing");
             $keyAccess = array("UserPweb", "123456", "localhost", "proyecto");
             break;
         default:
             $ConexionLocal = new MySQL(0);
             $ExecBD = $ConexionLocal->consulta("call GetDBKey(" . $option . ");");
             $returnKey = $ConexionLocal->fetch_row($ExecBD);
             $keyAccess = array($returnKey[2], $returnKey[3], $returnKey[1], "");
     }
     return $keyAccess;
 }
开发者ID:C0l0ch0,项目名称:CafeMomentos,代码行数:17,代码来源:MySQL.php

示例3: GoHome

 function GoHome()
 {
     $conexion = new MySQL(0);
     $query = 'call GetHomeURL(' . $_SESSION['pais'] . ');';
     $result1 = $conexion->consulta($query);
     $row = $conexion->fetch_row($result1);
     $conexion->MySQLClose();
     switch ($_SESSION['access']) {
         case 1:
         case 2:
         case 3:
             $home = 'http://' . URL . DS . 'dashboard' . DS . 'metricas';
             break;
         default:
             $home = 'http://' . URL . DS . $row[0];
             break;
     }
     return $home;
 }
开发者ID:C0l0ch0,项目名称:BPV_WAU,代码行数:19,代码来源:login.php

示例4: getlogged

 public static function getlogged($name)
 {
     $conexion = new MySQL(0);
     $query = "select logged, date_logged,session_id,now() as fe from usuario where usuario = '{$name}'";
     $result1 = $conexion->consulta($query);
     $valor = $conexion->num_rows($result1);
     if ($valor == 1) {
         $row = $conexion->fetch_row($result1);
         $value1 = $row[0];
         $value2 = $row[1];
         $value3 = $row[2];
         $ahora = $row[3];
         $tiempo_transcurrido = strtotime($ahora) - strtotime($value2);
         if ($tiempo_transcurrido >= 875) {
             $query = "update usuario set logged = 0, date_logged = now() where usuario = '{$name}';";
             $result1 = $conexion->consulta($query);
             $value1 = 0;
         } else {
             if (isset($_COOKIE['billing'])) {
                 if ($_COOKIE['billing'] == $value3) {
                     $query = "update usuario set logged = 0, date_logged = now(),session_id = '' where usuario = '{$name}';";
                     $result1 = $conexion->consulta($query);
                     setcookie('billing', null, -1, '/');
                     $value1 = 0;
                 }
             } else {
                 if ($value1 != 0) {
                     $value1 = 1;
                 }
             }
         }
         if ($value1 == 1) {
             $return = "islogged";
         } else {
             $return = "notlogged";
         }
         $conexion->MySQLClose();
         return $return;
     } else {
         $conexion->MySQLClose();
         return "not.found";
     }
 }
开发者ID:C0l0ch0,项目名称:CafeMomentos,代码行数:43,代码来源:Validate_Auth.php

示例5: GetSecondLevel

function GetSecondLevel($carrier, $al)
{
    $conexion1 = new MySQL(0);
    if ($_SESSION['access'] == 5) {
        $query = 'call GetSubMenuLimits(' . $carrier . ');';
    } else {
        $query = 'call GetSubMenu(' . $carrier . ');';
    }
    $result = $conexion1->consulta($query);
    $miniBody = '';
    while ($link = $conexion1->fetch_row($result)) {
        $urlC = $link[2] == 1 ? 'http://' . URL . DS . $link[0] : $link[0];
        $IamHere = $al == $urlC ? 'class="active""' : '';
        if ($link[2] == 1) {
            $miniBody = $miniBody . "\t\t\t\t\t\t\t" . '<li ' . $IamHere . '><a href="' . $urlC . '">' . $link[1] . '</a></li>' . "\n";
        } else {
            $miniBody = $miniBody . "\t\t\t\t\t\t\t" . '<li ><a href="' . $urlC . '" target="_blank">' . $link[1] . '</a></li>' . "\n";
        }
    }
    $conexion1->MySQLClose();
    return $miniBody;
}
开发者ID:C0l0ch0,项目名称:BPV_WAU,代码行数:22,代码来源:menuSA.php

示例6: MySQL

if (isset($_POST["username"])) {
    $busca = $_POST["username"];
} else {
    $busca = "";
}
if (isset($_POST["supera"])) {
    $evento = $_POST["supera"];
} else {
    $evento = "";
}
$conexion = new MySQL(1);
$super = "per_david";
if ($busca != "") {
    $query = "select a.product_id , a.product_name, c.name,b.description,d.carrier_name\r\n\t\t\t\t\t\tfrom {$super}.product_master a\r\n\t\t\t\t\t\tjoin {$super}.product_status_master b on a.product_status_id = b.product_status_id\r\n\t\t\t\t\t\tjoin {$super}.integratordetails c on a.integror_id =c.integrator_id \r\n\t\t\t\t\t\tjoin {$super}.carrier_master d on d.carrier_id = c.carrier_id\r\n\t\t\t\t\t\twhere product_id = {$busca}";
    $result = $conexion->consulta($query);
    $row = $conexion->fetch_row($result);
    echo "<tr><td>{$row['0']}</td><td>{$row['1']}</td><td>{$row['2']}</td><td>{$row['3']}</td><td>{$row['4']}</td>";
    echo "</tbody>";
}
?>
					
				
								</table>
							</div>
						</div>
					</div>
                    <!-- end panel -->
                </div>
				
                <!-- end col-6 -->
				
开发者ID:C0l0ch0,项目名称:BPV_WAU,代码行数:30,代码来源:notificacionessaper.php

示例7: MySQL

<?php

import::load('lib', 'MySQL');
$conexion = new MySQL(6);
$strConsulta = "select amq_name,descripcion,pendiente,consumidores from monitor_queue;";
$consulta = $conexion->consulta($strConsulta);
if ($conexion->num_rows($consulta) > 0) {
    echo '<h1 class="page-header">ActiveMQ <small>Detalle de colas Alarmadas</small></h1>
						<div>';
    while ($row2 = $conexion->fetch_row($consulta)) {
        echo '
						<div class="col-md-3 " >
				        <div class="widget widget-stats bg-black">
				            <div class="stats-icon stats-icon-lg"><i class="fa fa-globe fa-fw"></i></div>
				            <div class="stats-title">' . $row2[0] . '<small> ' . $row2[1] . '</small></div>
				            <div class="stats-number"><small>Encolados:</small> ' . $row2[2] . '</div>
				            <div class="stats-progress progress">
	                            <div class="progress-bar" style="width: 100%;"></div>
	                        </div>
	                        <div class="stats-desc">Consumidores: ' . $row2[3] . '</div>
				        </div>
				        </div>';
    }
    echo '</div>';
}
开发者ID:C0l0ch0,项目名称:BPV_WAU,代码行数:25,代码来源:ActiveMQ.php

示例8: check_forum_perm

function check_forum_perm($forum_id, $g_id, $perm)
{
    global $CONFIG_sql_cpdbname;
    $sql = new MySQL();
    $query = "SELECT forum_perm FROM {$CONFIG_sql_cpdbname}.forum WHERE forum_id=\"" . mysql_res($forum_id) . "\"";
    $sql->result = $sql->execute_query($query, 'function.php');
    if ($sql->count_rows()) {
        $row = $sql->fetch_row();
        if (preg_match("#\\[g" . $g_id . "\\](.+?)\\[/g" . $g_id . "\\]#is", $row[0])) {
            preg_replace_callback("#\\[g" . $g_id . "\\](.+?)\\[/g" . $g_id . "\\]#is", 'get_forum_perm', $row[0]);
            global $forum_permission;
            switch ($perm) {
                case "read_perm":
                    if (!strstr($forum_permission, ":show_perm:")) {
                        return false;
                    }
                    break;
                case "reply_perm":
                case "start_perm":
                    if (!strstr($forum_permission, ":show_perm:")) {
                        return false;
                    }
                    if (!strstr($forum_permission, ":read_perm:")) {
                        return false;
                    }
                    break;
            }
            if (strstr($forum_permission, ":" . $perm . ":")) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    } else {
        return false;
    }
}
开发者ID:koeznailbiter,项目名称:Koez-RO-CP,代码行数:39,代码来源:function.php

示例9: MySQL

 function save_sa()
 {
     if (isset($_POST["descripcion"]) and isset($_POST["pais"]) and $_POST["descripcion"] != '' and $_POST["pais"] != '') {
         $conexion = new MySQL(0);
         $strIngreso = "call CheckIfTableExist('" . strtolower($_POST["descripcion"]) . "');";
         $execute = $conexion->consulta($strIngreso);
         $exist = $conexion->fetch_row($execute);
         $conexion->MySQLClose();
         echo "1";
         if ($exist[0] == 0) {
             $conexion = new MySQL(0);
             $strIngreso = "call CheckIfTableExist('" . strtolower($_POST["descripcion"]) . "_i');";
             $execute2 = $conexion->consulta($strIngreso);
             $exist2 = $conexion->fetch_row($execute2);
             $conexion->MySQLClose();
             echo "2";
             if ($exist2[0] == 0) {
                 $conexion = new MySQL(0);
                 $strIngreso = "call CreateTables('" . strtolower($_POST["descripcion"]) . "');";
                 $execute = $conexion->consulta($strIngreso);
                 $conexion->MySQLClose();
                 echo "3";
                 $conexion = new MySQL(0);
                 $strIngreso = "insert into billing.carrier (id_carrier,descripcion, nombre) values(null,'" . strtoupper($_POST["descripcion"]) . "','" . strtoupper($_POST["pais"]) . "');";
                 $execute = $conexion->consulta($strIngreso);
                 $conexion->MySQLClose();
                 echo "4";
                 $_SESSION['value'] = "ok";
             } else {
                 $_SESSION['value'] = "error1";
             }
         } else {
             $_SESSION['value'] = "error1";
         }
         session_write_close();
         exit(header('Location: http://' . URL . DS . 'database' . DS . 'create_sa'));
     } else {
         exit(header('Location: http://' . URL . DS . 'database' . DS . 'create_sa'));
     }
 }
开发者ID:C0l0ch0,项目名称:BPV_WAU,代码行数:40,代码来源:database.php

示例10: get_save_quick_edit

function get_save_quick_edit($val, $reply_id)
{
    header("Content-type: text/xml;charset=windows-874");
    global $CONFIG_sql_cpdbname, $STORED, $SERVER, $CONFIG_max_post_length, $CP;
    $reply_id = (int) $reply_id;
    $val = iconv("UTF-8", "windows-874", $val);
    $val = str_replace("symbol_and", "&", $val);
    $val = str_replace("symbol_plus", "+", $val);
    $form_id = "quick_edit_form_" . $reply_id . "";
    $sql = new MySQL();
    $query = "SELECT reply_id,reply_message,reply_edit_date,reply_edit_name FROM {$CONFIG_sql_cpdbname}.board_reply WHERE reply_id =\"" . mysql_res($reply_id) . "\"";
    $sql->result = $sql->execute_query($query, 'lib_ajax.php');
    $row = $sql->fetch_row();
    $IS_EDIT_POST = checkprivilege_action($CP[login_id], g_edit_posts) ? 1 : 0;
    if (!empty($CP[login_id]) && ($CP[login_id] == $row[reply_user_id] || $IS_EDIT_POST) && length($val, 3, $CONFIG_max_post_length)) {
        $val = checkstring($val, 1);
        $sql->execute_query("UPDATE {$CONFIG_sql_cpdbname}.board_reply SET reply_message = \"" . $val . "\", reply_ip=\"" . $CP['ip_address'] . "\",reply_edit_name=\"" . $CP['login_name'] . "\",reply_edit_date=\"" . $CP['time'] . "\" WHERE reply_id = \"" . mysql_res($row['reply_id']) . "\"", 'lib_ajax.php');
        $query = "SELECT reply_message,reply_edit_date,reply_edit_name FROM {$CONFIG_sql_cpdbname}.board_reply WHERE reply_id =\"" . mysql_res($row['reply_id']) . "\"";
        $sql->result = $sql->execute_query($query, 'lib_ajax.php');
        $row = $sql->fetch_row();
        $reply_message = replace_text($row[reply_message], $img_num);
        $reply_edit_date = get_date("M j y, H:i:s A", $row[reply_edit_date]);
        echo "<div class=\"poststyle\">{$reply_message}</div>\n<br /><br /><span class=\"edit\">This post has been edited by <B>{$row['reply_edit_name']}</B> on {$reply_edit_date}</span>\n";
    } else {
        $reply_message = replace_text($row[reply_message]);
        echo "<div class=\"poststyle\">{$reply_message}</div>";
        if (!empty($row[reply_edit_name])) {
            $reply_edit_date = get_date("M j y, H:i:s A", $row[reply_edit_date]);
            echo "<br /><br /><span class=\"edit\">This post has been edited by <B>{$row['reply_edit_name']}</B> on {$reply_edit_date}</span>";
        }
    }
}
开发者ID:koeznailbiter,项目名称:Koez-RO-CP,代码行数:32,代码来源:lib_ajax.php

示例11: getData

function getData($name, $num)
{
    $dataArray = "";
    $fecha = date('H', strtotime("+1 Hours"));
    $dia = date('d', strtotime("+1 day"));
    try {
        $conexion = new MySQL(0);
        $query0 = ' select hour(date_add(NOW(), INTERVAL -' . HOURDB . ' hour));';
        $result0 = $conexion->consulta($query0);
        $exec0 = $conexion->fetch_row($result0);
        $fecha = $exec0[0];
        $query = 'CALL GetCarrierChargeToday("' . strtolower($name) . '",' . HOURDB . ');';
        $result = $conexion->consulta($query);
        $conexion->prepareNextResult();
        $query1 = 'CALL GetCarrierChargeYesterday("' . strtolower($name) . '",' . HOURDB . ');';
        $result1 = $conexion->consulta($query1);
        $conexion->prepareNextResult();
        $query2 = 'CALL GetCarrierChargeProm("' . strtolower($name) . '",' . HOURDB . ');';
        $result2 = $conexion->consulta($query2);
        $conexion->prepareNextResult();
        if (!$result or !$result1 or !$result2) {
            throw new Exception("No se logro obtener informacion de cobros....\n");
        } else {
            $cont = 0;
            @($hoy = $conexion->fetch_row($result));
            @($ayer = $conexion->fetch_row($result1));
            @($prom = $conexion->fetch_row($result2));
            while ($cont <= $fecha) {
                if ($ayer[1] == $cont and $ayer[1] != '') {
                    @($valor = $ayer[0]);
                    @($ayer = $conexion->fetch_row($result1));
                } else {
                    $valor = 0;
                }
                if ($hoy[1] == $cont and $hoy[1] != '') {
                    @($valor1 = $hoy[0]);
                    @($hoy = $conexion->fetch_row($result));
                } else {
                    $valor1 = 0;
                }
                if ($prom[1] == $cont and $prom[1] != '') {
                    @($valor2 = $prom[0]);
                    @($prom = $conexion->fetch_row($result2));
                } else {
                    $valor2 = 0;
                }
                $dataArray = $dataArray . "data" . $num . ".addRow([" . $cont . ", " . number_format($valor2, 0, '', '') . ", " . $valor . " , " . $valor1 . "]);\n";
                //$dataArray = $dataArray."data1.addRow([".$cont.", ".$valor2.",".$valor.", ".$valor1."]);\n";
                $cont++;
            }
            /*while ($hoy = $conexion->fetch_row($result)){
                if( @$ayer  = $conexion->fetch_row($result1) and
                    @$prom1 = $conexion->fetch_row($result2)){
                    if($hoy[0]    == ''){$hoy[0]    = 0;}
                    if($ayer[0]   == ''){$ayer[0]   = 0;}
                    if($prom1[0]  == ''){$prom1[0]  = 0;}
                    $dataArray = $dataArray."data".$num.".addRow([".$hoy[1].", ".number_format($prom1[0],0,'','').", ".$ayer[0]." , ".$hoy[0]."]);\n";
                }
              }*/
        }
        $conexion->MySQLClose();
    } catch (Exception $e) {
        echo 'Excepcion capturada: ', $e->getMessage(), "\n";
    }
    return $dataArray;
}
开发者ID:C0l0ch0,项目名称:BPV_WAU,代码行数:66,代码来源:metricas.php

示例12: GetCharges

 function GetCharges($db_selection, $query, $opt, $SaveAction)
 {
     if (isset($db_selection) and isset($query)) {
         try {
             $conectorLocal1 = new MySQL(0);
             $dbdata = "call GetDBKey(" . $db_selection . ");";
             $exec = $conectorLocal1->consulta($dbdata);
             $conectorLocal1->prepareNextResult();
             $result = $conectorLocal1->fetch_row($exec);
             self::MySQLExternal($result[1], $result[2], $result[3], $this->schema);
             if (!$this->ErrorExternalConector) {
                 $execute = self::externalQuery($query);
                 $i = 0;
                 while ($row = self::externalfetch_row($execute)) {
                     switch ($opt) {
                         case 1:
                             $LoadCant = 0;
                             if ($row[0] != "") {
                                 $LoadCant = $row[0];
                             }
                             self::AddBodyLog("Cobros generados: " . $LoadCant);
                             self::AddBodyLog("Enviando a guardar informacion...........");
                             self::SaveCharges($row, $opt, $SaveAction);
                             break;
                         case 2:
                             self::AddBodyLog("Cobros generados para " . $row[1] . ": " . $row[2]);
                             self::AddBodyLog("Enviando a guardar informacion...........");
                             self::SaveCharges($row, $opt, $SaveAction);
                             $i++;
                             break;
                         case 3:
                             $LoadCant = 0;
                             if ($row[0] != "") {
                                 $LoadCant = $row[0];
                             }
                             $dbdata = "call GetAVGChargesPerCarrier(" . $this->id_carrier . ",2);";
                             $exec = $conectorLocal1->consulta($dbdata);
                             $result = $conectorLocal1->fetch_row($exec);
                             $info[0] = $row[0];
                             $info[1] = $result[0];
                             self::AddBodyLog("Obteniendo Promedio de cobros " . $dbdata . ": " . $result[0]);
                             self::AddBodyLog("Cobros generados: " . $LoadCant);
                             self::AddBodyLog("Enviando a guardar informacion...........");
                             self::SaveCharges($info, $opt, $SaveAction);
                             break;
                         case 4:
                             self::AddBodyLog("Cobros generados para " . $row[2] . ": " . $row[3]);
                             self::AddBodyLog("Enviando a guardar informacion...........");
                             self::SaveCharges($row, $opt, $SaveAction);
                             $i++;
                             break;
                             break;
                     }
                 }
                 if ($opt == 2) {
                     self::AddBodyLog("Integradores Procesados: " . $i);
                 }
                 if ($opt == 4) {
                     self::AddBodyLog("Productos Procesados: " . $i);
                 }
             }
             $conectorLocal1->MySQLClose();
         } catch (Exception $e) {
             self::AddBodyLog("No se logro obtener la informacion de " . $this->carrier_name . " Validar conexion a Base de datos!!!!!!!!!!!!!!!");
             self::AddBodyLog("Trace " . $this->ErrorExternalConector);
         }
     }
 }
开发者ID:C0l0ch0,项目名称:BPV_WAU,代码行数:68,代码来源:BDCobros.php

示例13: MySQL

                                        </tr>
                                    </thead>
									
									<?php 
$conexion = new MySQL($bd_id);
$query2 = 'select a.integrator_id, b.name, c.cuenta, sum(a.qty)as "total"
									from ' . $schema . '.resume_carrier a
									join ' . $schema . '.integratordetails b on a.integrator_id = b.integrator_id
									join(select integror_id as integror_id, count(product_id) as "cuenta"
									from ' . $schema . '.product_master 									
									group by integror_id ) c on a.integrator_id = c.integror_id
									where a.created_date >= left(NOW() - INTERVAL 6 HOUR,10) and a.type in ("DB") and a.status = "Success"
									group by a.integrator_id';
$resultfox2 = $conexion->consulta($query2);
echo "<tbody>";
while ($row2 = $conexion->fetch_row($resultfox2)) {
    echo "<tr><td>{$row2['0']}</td><td><a onclick=\"GotoDetails({$row2['0']})\">{$row2['1']}<a></td><td>{$row2['2']}</td><td>" . number_format($row2[3]) . "</td></tr>";
}
echo "</tbody>";
?>
                                </table>
                            </div>
                        </div>
                    </div>
				     <!-- End Panel Integradores-->
					 
				</div>
			    <!-- end col-8  Integradores-->
				
				<!-- Begin Panel Contactos MOVISTAR-->
			    <div class="col-md-12">
开发者ID:C0l0ch0,项目名称:BPV_WAU,代码行数:31,代码来源:carrierD.php

示例14: DrawSomeTables

function DrawSomeTables()
{
    $Table = '';
    $conexionD = new MySQL(0);
    $query = 'call GetMaxTable();';
    $exec = $conexionD->consulta($query);
    $conexionD->prepareNextResult();
    $resultado = $conexionD->fetch_row($exec);
    $numFields = $resultado[1];
    $query = 'call GetDataTable();';
    $exec = $conexionD->consulta($query);
    $conexionD->prepareNextResult();
    $tempT2 = $tempT1 = '
                    <div class="CSSTableGenerator" style="display:inline-block;">
                      <table>
                        <tr>
                          <td >Super Agregador</td>
                          <td >Cobros Hoy</td>
                          <td >Promedio</td>
                          <td >Porcentaje</td>
                        </tr>
                        ';
    while ($row = $conexionD->fetch_row($exec)) {
        $nombreC = $row[0] == 'saca' ? 'SAGUA' : $row[0];
        $CantHoy = number_format($row[1]);
        $CantProm = number_format($row[2]);
        $CantPor = $CantProm == 0 ? 0 : number_format($CantHoy * 100 / $CantProm);
        switch ($row[3]) {
            case 1:
                $tempT1 = $tempT1 . '<tr><td align="center"><a href="http://' . URL . DS . 'detalle/' . strtolower($nombreC) . '"> ' . strtoupper($nombreC) . ' </a> </td><td align="right">' . $CantHoy . '</td><td align="right">' . $CantProm . '</td><td align="right">' . $CantPor . '%</td></tr>';
                break;
            case 2:
                $tempT2 = $tempT2 . '<tr><td align="center"><a href="http://' . URL . DS . 'detalle/' . strtolower($nombreC) . '"> ' . strtoupper($nombreC) . ' </a> </td><td align="right">' . $CantHoy . '</td><td align="right">' . $CantProm . '</td><td align="right">' . $CantPor . '%</td></tr>';
                break;
        }
    }
    $tempT1 = $tempT1 . '
                      </table>
                    </div>
                    <div style="display:inline-block;"></div>';
    $tempT2 = $tempT2 . '
                      </table>
                    </div>
                    <div style="display:inline-block;"></div>';
    $Table = $tempT1 . $tempT2;
    return $Table;
}
开发者ID:C0l0ch0,项目名称:BPV_WAU,代码行数:47,代码来源:metricas.php

示例15: GetArrayInfo

 private function GetArrayInfo($option, $mensaje)
 {
     $conexion = new MySQL(0);
     $query = "call GetDescriptionInfo('" . $option . "');";
     $exec = $conexion->consulta($query);
     $row2 = $conexion->fetch_row($exec);
     $return = array("Titulo" => "Billing Vas Pass", "mensaje" => $mensaje, "name1" => strtolower($row2[0]), "data1" => "", "pais" => $row2[1], "schema" => $row2[2], "bd_id" => $row2[3]);
     $conexion->MySQLClose();
     return $return;
 }
开发者ID:C0l0ch0,项目名称:BPV_WAU,代码行数:10,代码来源:detalle.php


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