本文整理汇总了PHP中toRow函数的典型用法代码示例。如果您正苦于以下问题:PHP toRow函数的具体用法?PHP toRow怎么用?PHP toRow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了toRow函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: searchCb
function searchCb($word, $accid, $begin = 0, $limit = 20)
{
global $db;
$acc = new Account();
$reply = new InboxReply();
$q = "\n \n (SELECT {$this->searchColoms} FROM {$this->table_name} INNER JOIN {$acc->table_name}\n ON ({$this->table_name}.inbox_from = {$acc->table_name}.admin_id)\n WHERE\n (inbox_from = '{$accid}' OR inbox_to = '{$accid}') AND inbox_type = 'cb' AND \n (inbox_judul LIKE '%{$word}%' OR inbox_msg LIKE '%{$word}%' OR admin_nama_depan LIKE '%{$word}%') \n )\n UNION\n (SELECT {$this->searchColoms} FROM {$this->table_name} INNER JOIN {$acc->table_name}\n ON ({$this->table_name}.inbox_to = {$acc->table_name}.admin_id)\n WHERE\n (inbox_from = '{$accid}' OR inbox_to = '{$accid}') AND inbox_type = 'cb' AND \n (inbox_judul LIKE '%{$word}%' OR inbox_msg LIKE '%{$word}%' OR admin_nama_depan LIKE '%{$word}%') \n ) \n ORDER BY inbox_changedate DESC LIMIT {$begin},{$limit}\n \n ";
$arr = $db->query($q, 2);
// pr($arr);
// echo $q;
$newMurid = array();
foreach ($arr as $databasemurid) {
$m = new Inbox();
$m->fill(toRow($databasemurid));
$newMurid[] = $m;
}
//return jumlah totalnya
$q = " \n (SELECT {$this->searchColoms} FROM {$this->table_name} INNER JOIN {$acc->table_name}\n ON ({$this->table_name}.inbox_from = {$acc->table_name}.admin_id)\n WHERE\n (inbox_from = '{$accid}' OR inbox_to = '{$accid}') AND inbox_type = 'cb' AND \n (inbox_judul LIKE '%{$word}%' OR inbox_msg LIKE '%{$word}%' OR admin_nama_depan LIKE '%{$word}%') \n )\n UNION\n (SELECT {$this->searchColoms} FROM {$this->table_name} INNER JOIN {$acc->table_name}\n ON ({$this->table_name}.inbox_to = {$acc->table_name}.admin_id)\n WHERE\n (inbox_from = '{$accid}' OR inbox_to = '{$accid}') AND inbox_type = 'cb' AND \n (inbox_judul LIKE '%{$word}%' OR inbox_msg LIKE '%{$word}%' OR admin_nama_depan LIKE '%{$word}%') \n ) \n ";
$arr2 = $db->query($q, 2);
return array("arrMsg" => $newMurid, "total" => count($arr2));
//die();
}
开发者ID:CapsuleCorpIndonesia,项目名称:es-teler-baru-suka,代码行数:21,代码来源:ChatGroup.php
示例17: getCalInMonthOptimized
public function getCalInMonthOptimized($mon, $year)
{
global $db;
$q = "SELECT * FROM {$this->table_name} WHERE (YEAR(cal_mulai) = {$year} AND MONTH(cal_mulai) = {$mon}) OR (YEAR(cal_akhir) = {$year} AND MONTH(cal_akhir) = {$mon}) ORDER BY cal_mulai ASC";
$muridkelas = $db->query($q, 2);
$newMurid = array();
$classname = get_called_class();
foreach ($muridkelas as $databasemurid) {
$m = new Calendar();
$m->fill(toRow($databasemurid));
$newMurid[] = $m;
}
return $newMurid;
}
开发者ID:CapsuleCorpIndonesia,项目名称:elang-combo,代码行数:14,代码来源:Calendar.php
示例18: getByUsername
public function getByUsername($username, $readcoloums = "*")
{
global $db;
$q = "SELECT {$readcoloums} FROM {$this->table_name} WHERE admin_username = '{$username}'";
$obj = $db->query($q, 1);
$row = toRow($obj);
$this->fill($row);
$this->load = 1;
}
开发者ID:CapsuleCorpIndonesia,项目名称:apel-enak,代码行数:9,代码来源:Account.php
示例19: process_login_fb
public function process_login_fb()
{
$email = $_SESSION['sementara']['admin_email'];
$fbid = $_SESSION['sementara']['admin_fb_id'];
if ($fbid == "" || $email == "") {
Redirect::loginFailed();
}
$arr = $this->getWhere("admin_email = '{$email}' AND admin_fb_id='{$fbid}' AND admin_aktiv = 1 ");
if (count($arr) > 0) {
//load by login ID
$obj = $arr[0];
$row = toRow($obj);
$this->fill($row);
if (isset($this->admin_id)) {
$_SESSION["admin_session"] = 1;
$_SESSION["account"] = $obj;
//Update setlastlogin
self::setLastUpdate($_SESSION["account"]->admin_id);
//lanjut
//loading metadata
$meta = new AccountMeta();
$meta->getMeta($this->admin_id);
//now loading roles
$this->loadRole();
//set cookie
Auth::setCookie($this->rememberme, $this->admin_id, $this->admin_email, $this->admin_password);
//kalau sukses
if (Auth::isLogged()) {
//load school setting
// $ss = new Schoolsetting();
// $ss->loadToSession();
//redirect
//Account::setRedirection ();
$acl = new AccountLogin();
Hook::processHook($acl->login_hook);
//login hook doesnt seem to work =>bypass
$qp = new QuizPoints();
$qp->getPoints();
$qp->saveUnsaved();
Redirect::firstPage();
} else {
Redirect::loginFailed();
}
} else {
return 0;
}
}
}
开发者ID:CapsuleCorpIndonesia,项目名称:elang-combo,代码行数:48,代码来源:SiteMember.php
示例20: getOrderBy
public function getOrderBy($orderAndLimit, $selectedColom = "*")
{
global $db;
$q = "SELECT {$selectedColom} FROM {$this->table_name} ORDER BY {$orderAndLimit}";
$muridkelas = $db->query($q, 2);
//pr($muridkelas);
$newMurid = array();
$classname = get_called_class();
foreach ($muridkelas as $databasemurid) {
$m = new $classname();
$m->fill(toRow($databasemurid));
$newMurid[] = $m;
}
return $newMurid;
}
开发者ID:CapsuleCorpIndonesia,项目名称:elang-combo,代码行数:15,代码来源:Model.php
注:本文中的toRow函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论