$user = $this->_modelUsers->findAll(array(array('roles.role_id', $_GET['role_id'])));
?>
Reference :
FleaPHP的数据库查询条件汇总解析
$user = $this->_modelUsers->findAll(array(array('roles.role_id', $_GET['role_id'])));
?>
$conditions = null;
$fields = array('id', 'name', 'sex', 'phone');
foreach($fields as $each)
{
if(!empty($_POST[$each]))
{
if($conditions)
{
$conditions .= " AND {$each}={$_POST[$each]}";
}
else
{
$conditions .= "{$each}={$_POST[$each]}";
}
}
}
?>
/**
* 返回符合条件的第一条记录及所有关联的数据,查询没有结果返回 false
*
* @param mixed $conditions
* @param string $sort
* @param mixed $fields
* @param mixed $queryLinks
*
* @return array
*/
function & find($conditions, $sort = null, $fields = '*', $queryLinks = true)
{
...
}
$rowsets = $tableposts->find('', '', '', false);
dump($rowsets);
/**
* 查询所有符合条件的记录及相关数据,返回一个包含多行记录的二维数组,失败时返回 false
*
* @param mixed $conditions
* @param string $sort
* @param mixed $limit
* @param mixed $fields
* @param mixed $queryLinks
*
* @return array
*/
function & findAll($conditions = null, $sort = null, $limit = null, $fields = '*', $queryLinks = true)
{
...
}
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.modeset=1"# update-grub
options i915 modeset=0
# vi /etc/modules
[...]loop max_loop=64
# vi /etc/xen/xend-config.sxp
[...]
(network-script network-bridge)
(network-script 'network-bridge netdev=eth1')
(network-script 'network-bridge antispoof=yes')
[...]
#(network-script network-dummy)
[...]
(vif-script vif-bridge)[...]
# vi /etc/default/xendomains
#XENDOMAINS_RESTORE=true
XENDOMAINS_RESTORE=false...
#XENDOMAINS_SAVE=/var/lib/xen/save
XENDOMAINS_SAVE=""
# vi /boot/grub/menu.lst
title Xen 4.1-i386 / Debian GNU/Linux, kernel 3.2.0-3-686-pae
root (hd0,0) kernel /boot/xen-4.1-i386.gz dom0_mem=256M vga=792
module /boot/vmlinuz-3.2.0-3-686-pae root=/dev/sda1 ro console=tty0module /boot/initrd.img-3.2.0-3-686-pae
# vi /etc/xen/xend-config.sxp
(xend-unix-server yes)
# vi /etc/xen/xend-config.sxp
(vnc-listen '0.0.0.0')
$ wget http://ftp.nl.debian.org/debian/dists/squeeze/main/installer-i386/current/images/hd-media/boot.img.gz// 將開機檔案解壓至隨身碟 (注意:此時隨身碟應為非掛載狀態,執行動作後隨身碟資料會被洗掉)
# zcat boot.img.gz > /dev/sdb (應改為你的 USB 碟位置)
$ wget http://cdimage.debian.org/debian-cd/current/i386/iso-cd/debian-6.0.6-i386-businesscard.iso// 將隨身碟掛載起來,並將 iso 檔複製進去
# mount /dev/sdb1 /mnt
# cp debian-6.0.6-i386-businesscard.iso /mnt/netinst.iso
# umount /mnt
$ VBoxManage internalcommands createrawvmdk -filename ~/mydrive.vmdk -rawdisk /dev/sda -partitions 1
> cd C:\Program Files\Oracle\VirtualBox
> VBoxManage internalcommands createrawvmdk -filename D:\mydrive.vmdk -rawdisk \\.\PhysicalDrive3 -partitions 1
設定值 -> 存放裝置 -> IDE 控制器 -> 加入硬碟 |
選擇現有的硬碟 |
如果原本已經有安裝系統,加入新的映像後會多一個裝置,選擇 2) Primary Slave 從隨身碟開機 |
ATAPI.SYS2. 執行 MERGEIDE.REG 登錄檔
INTELIDE.SYS
PCIIDE.SYS
PCIIDEX.SYS
> bcdedit
等同於
> bcdedit /enum ACTIVE
XP
> bcdedit /set {ntldr} description "Windows XP"
7
> bcdedit /set {current} description "Windows 7"
> bcdedit /default {ntldr}
> bcdedit /timeout 15
ready : 在網頁 DOM 結構就緒時
jQuery
$(document).ready(function(){ //do something });
jQuery 默認參數是 document$().ready(function(){ //do something });$(function(){
//do something
});
|
javascript
jQuerywindow.onload = function(){ //do something };
$(window).load(function(){
//do something
});
mysql> set global log_output=file;
mysql> set global general_log_file='/var/log/mysql/general.log';
mysql> set global slow_query_log_file='/car/log/mysql/slow.log';
mysql> set global general_log=on;
mysql> set global slow_query_log=on;
mysql> SHOW VARIABLES LIKE 'slow_query_log_file';
# cat /var/log/mysql/general.log | grep -E '[[:space:]]+[[:digit:]]+[[:space:]]Query' | grep -iE 'Query([[:space:]])+(/\*.*\*/)?(insert|update|delete)'
function apt-history(){ case "$1" in install) cat /var/log/dpkg.log | grep 'install ' ;; upgrade|remove) cat /var/log/dpkg.log | grep $1 ;; rollback) cat /var/log/dpkg.log | grep upgrade | \ grep "$2" -A10000000 | \ grep "$3" -B10000000 | \ awk '{print $4"="$5}' ;; *) cat /var/log/dpkg.log ;; esac }
$ wget ftp://WebUser:Lc9FuH5r@209.222.7.36/cn/wlan/RTL819xC_USB_linux_v3.4.4_4749.20120806.zip
$ unzip RTL819xC_USB_linux_v3.4.4_4749.20120806.zip
$ cd RTL8188C_8192C_USB_linux_v3.4.4_4749.20120806/
$ chmod u+x install.sh
$ ./install.sh
td, th$ cd ../../
padding: 4px
thead th
text-align: center
background: #E6EDF5
color: #4F76A3
font-size: 100% !important
tbody th
font-weight: bold
tbody tr
background: #FCFDFE
tbody tr.odd
background: #F7F9FC
line 300 :
FLEA_Com_RBAC_UsersManager::changePassword($username, $oldPassword, $newPassword)
line 323 :
FLEA_Com_RBAC_UsersManager::updatePassword($username, $newPassword)
line 340 :
FLEA_Com_RBAC_UsersManager::updatePasswordById($userid, $newPassword)
/** * 指示 RBAC 组件用什么键名在 session 中保存用户数据 * * 如果在一个域名下同时运行多个应用程序, * 请务必为每一个应用程序使用自己独一无二的键名 */
line=$( msgmerge -v -o locale/$i/LC_MESSAGES/messages.po locale/$i/LC_MESSAGES/messages.po messages.po 2>&1 )
# 檢查是否有更新
missing=$( echo $line | grep -o 'missing [0-9]\+' | awk '{print $2}' )
if [ $missing -gt 0 ];then
echo "* $missing updated."
echo "You should edit 'locale/$i/LC_MESSAGES/messages.po'"
fi
xgettext: warning: file `xxx.html' extension `html' is unknown; will try C
$ xgettext -d messages APP/View/*.html --from-code=UTF-8 --language=PHP