當前位置: 首頁>>代碼示例>>PHP>>正文


PHP toRow函數代碼示例

本文整理匯總了PHP中toRow函數的典型用法代碼示例。如果您正苦於以下問題:PHP toRow函數的具體用法?PHP toRow怎麽用?PHP toRow使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了toRow函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getMainpic

 function getMainpic($gid)
 {
     global $db;
     $q = "SELECT * FROM {$this->table_name} WHERE gallery_id = '{$gid}' AND photo_mainpic = 1 LIMIT 0,1";
     $obj = $db->query($q, 1);
     $this->fill(toRow($obj));
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:biji_katak,代碼行數:7,代碼來源:Galleryphoto.php

示例2: getLatestNewsFeature

 public function getLatestNewsFeature()
 {
     global $db;
     $q = "SELECT * FROM {$this->table_name} WHERE ID!=1 AND ID!=6 AND post_image !='' ORDER BY  post_modified DESC LIMIT 0,1";
     $obj = $db->query($q, 1);
     $this->fill(toRow($obj));
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:elang-combo,代碼行數:7,代碼來源:Page.php

示例3: getLastCommentByID

 public function getLastCommentByID($wid)
 {
     global $db;
     $q = "SELECT {$this->default_read_coloms} FROM {$this->table_name} WHERE wid = '{$wid}' ORDER BY c_date DESC LIMIT 0,1";
     $obj = $db->query($q, 1);
     $this->fill(toRow($obj));
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:es-teler-baru-suka,代碼行數:7,代碼來源:WallPortalComment.php

示例4: getDefaultChannel

 public function getDefaultChannel()
 {
     global $db;
     $q = "SELECT * FROM {$this->table_name} WHERE channel_default = 1 LIMIT 0,1";
     $obj = $db->query($q, 1);
     $this->fill(toRow($obj));
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:biji_katak,代碼行數:7,代碼來源:NewsChannel.php

示例5: getLastReply

 public function getLastReply($id)
 {
     global $db;
     $q = "SELECT * FROM {$this->table_name} WHERE inbox_id = '{$id}' ORDER BY inbox_createdate DESC LIMIT 0,1";
     $obj = $db->query($q, 1);
     $row = toRow($obj);
     $this->fill($row);
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:biji_katak,代碼行數:8,代碼來源:ChatMsg.php

示例6: getSelfAndAccount

 public function getSelfAndAccount($id)
 {
     global $db;
     $acc = new Account();
     $q = "SELECT {$this->default_read_coloms} FROM {$this->table_name},{$acc->table_name} WHERE account_id = '{$id}' AND admin_id = account_id";
     $obj = $db->query($q, 1);
     $row = toRow($obj);
     $this->fill($row);
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:biji_katak,代碼行數:9,代碼來源:ModelAccount.php

示例7: myHomeroomTeacher

 public function myHomeroomTeacher()
 {
     $ta = TahunAjaran::ta();
     $kelas = Account::getMyKelas($ta);
     $guru = new Guru();
     $row = $guru->getHomeroomFromKelas($ta, $kelas->kelas_id);
     $guru->fill(toRow($row));
     //pr($guru);
     Mold::both("leap/homeroom_widget", array("guru" => $guru, "kelas" => $kelas));
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:elang-combo,代碼行數:10,代碼來源:Widget.php

示例8: saveFromJS

 public function saveFromJS()
 {
     $user = json_decode($_POST['user']);
     //pr($user);
     $fb = new FBUser();
     $fb->fill(toRow($user));
     //pr($fb);
     $fb->save();
     $fb->saveToSession();
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:elang-combo,代碼行數:10,代碼來源:FBUser.php

示例9: getLatest

 public function getLatest($begin = 0, $limit = 20)
 {
     global $db;
     $q = "SELECT * FROM {$this->table_name} ORDER BY wall_update DESC LIMIT {$begin},{$limit}";
     $muridkelas = $db->query($q, 2);
     $newMurid = array();
     $classname = get_called_class();
     foreach ($muridkelas as $databasemurid) {
         $m = new WallPortal();
         $m->fill(toRow($databasemurid));
         $newMurid[] = $m;
     }
     return $newMurid;
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:es-teler-baru-suka,代碼行數:14,代碼來源:WallPortal.php

示例10: getWhereFromMultipleTable

 public function getWhereFromMultipleTable($whereClause, $arrTables = array(), $selectedColom = "*")
 {
     global $db;
     //implode the tables
     if (count($arrTables) < 1) {
         die("please use normal getWhere");
     }
     foreach ($arrTables as $tableClassname) {
         $m = new $tableClassname();
         $imp[] = $m->table_name;
     }
     $implode = implode(",", $imp);
     $q = "SELECT {$selectedColom} FROM {$this->table_name},{$implode} WHERE {$whereClause}";
     $muridkelas = $db->query($q, 2);
     $newMurid = array();
     $classname = get_called_class();
     foreach ($muridkelas as $databasemurid) {
         $m = new $classname();
         $m->fill(toRow($databasemurid));
         $newMurid[] = $m;
     }
     return $newMurid;
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:martabak_revolution,代碼行數:23,代碼來源:Model.php

示例11: getByMyChannels

 public function getByMyChannels($array_channels, $sort = "")
 {
     //pr($array_channels);
     if (count($array_channels) < 1) {
         return array();
     }
     $strpp = array();
     foreach ($array_channels as $chn) {
         $strpp[] = " webapps_channel_id = '{$chn}' ";
     }
     $imp = implode(" OR ", $strpp);
     //echo $imp;
     global $db;
     $q = "SELECT {$this->default_read_coloms} FROM {$this->table_name} WHERE ({$imp}) {$sort}";
     $muridkelas = $db->query($q, 2);
     $newMurid = array();
     $classname = get_called_class();
     foreach ($muridkelas as $databasemurid) {
         $m = new $classname();
         $m->fill(toRow($databasemurid));
         $newMurid[] = $m;
     }
     return $newMurid;
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:biji_katak,代碼行數:24,代碼來源:ModelWebApps.php

示例12: toRow

    var data = [
	<?php 
function toRow($array)
{
    $string = "['{$array['0']}'";
    for ($i = 1; $i < count($array); $i++) {
        $string = $string . ",'" . $array[$i] . "'";
    }
    $string = $string . "]";
    return $string;
}
foreach ($resultarray as $key => $value) {
    if ($key == 0) {
        echo toRow($value);
    } else {
        echo "," . toRow($value);
    }
}
?>
	
		
    ];

    var store = new Ext.data.Store({
        proxy: new Ext.data.MemoryProxy(data),
        reader: new Ext.data.ArrayReader({}, [
            {name: 'fenxi'}
			<?php 
for ($i = 0; $i < count($row); $i++) {
    echo ",{name: '{$i}'}";
}
開發者ID:eseawind,項目名稱:crawler,代碼行數:31,代碼來源:2.php

示例13: sync_articletagging

 function sync_articletagging()
 {
     $token = IMBAuth::createOAuth();
     $url = "http://localhost:8888/tbsecom/LLProdWeb/LL_ArticleTagging_wbase?cmd=ws&mws=getall&token=" . $token;
     //        echo $url;
     //        pr($_POST);
     $contents = file_get_contents($url);
     //        pr($contents);
     $obj = json_decode($contents);
     //        pr($obj);
     //        $nn = new MProdModel();
     //        global $db;
     //        $db->query("UPDATE {$nn->table_name} SET prod_active = 0",1);
     if ($_POST['radio'] == "truncate") {
         $nn = new MArticleTagging();
         $nn->truncate();
     }
     //        pr($obj);
     $num = 0;
     $gagal = 0;
     $gagalArr = array();
     foreach ($obj->results as $new) {
         $nn = new MArticleTagging();
         $nn->fill(toRow($new));
         //            $nn->prod_active = 1;
         if ($nn->save(1)) {
             $num++;
         } else {
             $gagal++;
             $gagalArr = $new->rel_id;
         }
     }
     $json['success'] = $num;
     $json['failed'] = $gagal;
     $json['failed_arr'] = $gagalArr;
     echo json_encode($json);
     die;
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:es-teler-baru-suka,代碼行數:38,代碼來源:Mintergrate.php

示例14: getAllMyKelas

 public function getAllMyKelas()
 {
     global $db;
     $kelas = new Kelas();
     $q = "SELECT kelas_id,kelas_tingkatan,kelas_name,mk_ta_id FROM {$this->table_murid_kelas},{$kelas->table_name} WHERE mk_murid_id = '{$this->murid_id}' AND mk_kelas_id = kelas_id ORDER BY mk_ta_id ASC";
     //echo $q;
     $muridkelas = $db->query($q, 2);
     //pr($muridkelas);
     $newMurid = array();
     foreach ($muridkelas as $databasemurid) {
         $m = new Kelas();
         $m->fill(toRow($databasemurid));
         $newMurid[] = $m;
     }
     return $newMurid;
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:elang-combo,代碼行數:16,代碼來源:Murid.php

示例15: loadByUserLogin

 public function loadByUserLogin()
 {
     //get parameters
     $username = $this->admin_username;
     $password = $this->admin_password;
     $rememberme = $this->rememberme;
     $ldap = $this->admin_ldap;
     //checksyarat
     if (!isset($username) || !isset($password)) {
         Redirect::loginFailed();
     }
     //load from db
     global $db;
     if (!$ldap) {
         $sql = "SELECT * FROM {$this->table_name} WHERE admin_username = '{$username}' AND admin_password = '{$password}' AND admin_aktiv = 1 ";
     } else {
         $sql = "SELECT * FROM {$this->table_name} WHERE admin_username = '{$username}' AND admin_aktiv = 1 ";
     }
     $obj = $db->query($sql, 1);
     $row = toRow($obj);
     $this->fill($row);
     if (isset($this->admin_id)) {
         $_SESSION["admin_session"] = 1;
         $_SESSION["account"] = $obj;
         //Update setlastlogin
         return self::setLastUpdate($_SESSION["account"]->admin_id);
     } else {
         return 0;
     }
 }
開發者ID:CapsuleCorpIndonesia,項目名稱:es-teler-baru-suka,代碼行數:30,代碼來源:Account.php


注:本文中的toRow函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。