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


PHP connection::fetch方法代码示例

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


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

示例1: fetchOne

 public static function fetchOne($sql)
 {
     $con = new connection();
     $con->execute($sql);
     $con->fetch();
     return $con->rows;
 }
开发者ID:pearlsortman,项目名称:ipohype,代码行数:7,代码来源:connection.php

示例2: dateExists

function dateExists()
{
    $date = date('Y-m-d', strtotime($_GET['date']));
    $sql = "SELECT COUNT(*) AS count FROM ipodate WHERE ipodate = '" . mysql_escape_string($date) . "'";
    $con = new connection();
    $con->execute($sql);
    die($con->fetch());
}
开发者ID:pearlsortman,项目名称:ipohype,代码行数:8,代码来源:control.php

示例3: useralive

 function useralive($userid)
 {
     $con= new connection();
     $con->execute("select time from users where iduser='$userid'");
     $con->fetch();
     $time1=  $con->rows['time'];
     if ($time1<(time()-13))
     return false;
     else
     return true;
 }
开发者ID:slavik0329,项目名称:mobileroulette,代码行数:11,代码来源:users.class.php

示例4: getSymbols

function getSymbols()
{
    // get a list of IPOs from database that are missing the ipoprice
    $sql = "SELECT DISTINCT symbol FROM ipo WHERE ipoprice IS NULL";
    $con = new connection();
    $con->execute($sql);
    $symbols = array();
    while ($con->fetch()) {
        $symbols[] = $con->rows["symbol"];
    }
    return $symbols;
}
开发者ID:pearlsortman,项目名称:ipohype,代码行数:12,代码来源:pricingscrape.php

示例5: getSymbols

function getSymbols()
{
    // get a list of all IPOs that don't have first day open/close price set
    $sql = "SELECT DISTINCT symbol, ipodate FROM ipo WHERE closeprice = 0 OR openprice = 0";
    $con = new connection();
    $con->execute($sql);
    $symbols = array();
    while ($con->fetch()) {
        $symbols[] = array("symbol" => $con->rows["symbol"], "ipodate" => $con->rows["ipodate"]);
    }
    return $symbols;
}
开发者ID:pearlsortman,项目名称:ipohype,代码行数:12,代码来源:ipoupdate.php

示例6: symbolsNoScore

function symbolsNoScore()
{
    // get a list of IPOs and their dates from the database that are missing tweets/hype or are in the future
    $sql = "SELECT DISTINCT symbol, ipodate FROM ipo WHERE hype IS NULL OR ipodate >= CURDATE()";
    $con = new connection();
    $con->execute($sql);
    $symbols = array();
    while ($con->fetch()) {
        $symbol = array();
        $symbol["symbol"] = $con->rows["symbol"];
        $symbol["ipodate"] = strtotime($con->rows["ipodate"]);
        $symbols[] = $symbol;
    }
    return $symbols;
}
开发者ID:pearlsortman,项目名称:ipohype,代码行数:15,代码来源:hypescrape.php

示例7: closedeadrooms

 function closedeadrooms()
 {
     $con= new connection();
     $con->execute("select idchat, user1, user2, full from chat where closed<>'Y'");
     while($con->fetch())
     {
     $user= new users();
     if ($user->useralive($con->rows['user1'])==false)
     $this->closeroom($con->rows['idchat']);
     if ($user->useralive($con->rows['user2'])==false && $con->rows['full']=='Y')
     $this->closeroom($con->rows['idchat']);
     
     }
 }
开发者ID:slavik0329,项目名称:mobileroulette,代码行数:14,代码来源:chat.class.php

示例8: connection

else
    echo "<b>Partner has left the chat</b>";

echo " - $count Users Online!";    
$con=new connection();
$con->execute("select * from text where idchat='" . $_REQUEST['idchat'] . "' ");
$count=$con->numRows();
/*
if ($count > 12)
    $start=$count - 12;
else
    $start=0;
*/
$con->execute("select * from text where idchat='" . $_REQUEST['idchat'] . "'");

while ($con->fetch())
    {
    $name = $user->getname($con->rows['iduser']);
    $txt=stripslashes($con->rows['text']);
    echo "<div style='margin:2px; padding:5px; width:290px; color:#333333; font-size:11px; font-family:\"lucida grande\",tahoma,verdana,arial,sans-serif; background-color:#ECEFF5; '><span style='font-weight:bold;color:#3B5998; text-transform:capitalize; margin-right:3px;'>$name</span>  {$txt}</div>";
    }
    if ($chat->chatclosed($_REQUEST['idchat']) )
        echo "<div style='margin:2px; padding:5px; width:290px; color:#333333; font-size:11px; font-family:\"lucida grande\",tahoma,verdana,arial,sans-serif; background-color:#ECEFF5; '><span style='font-weight:bold;color:#3B5998; text-transform:capitalize; margin-right:3px;'></span> Your partner has left the chat</div>";

    
     $con->execute("update users set time='" . time() . "' where iduser='{$_POST['iduser']}'");       
if (!$chat->chatclosed($_REQUEST['idchat']) && $chat->getchatpartnerid($_POST['idchat'], $_POST['iduser']))
    {

    $timeout=time() - 10;
    $con->execute(
开发者ID:slavik0329,项目名称:mobileroulette,代码行数:31,代码来源:talk.php


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