freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

zendframework數(shù)據(jù)庫操作總結(jié)-文庫吧

2025-09-09 03:20 本頁面


【正文】 esult = $dbquery(‘SELECT * FROM `m_video`’)。//$result = $db query(‘SELECT * FROM `m_video` WHERE `name` = ? AND id = ?’,array(‘ 十二生肖奇緣 ’, ’1′))。//$result setFetchMode(Zend_Db::FETCH_OBJ)。//FETCH_OBJ 為默認(rèn) 值 ,FETCH_NUM,FETCH_BOTH //while($row = $resultfetch()){ // echo $row[39。name39。]。//} //$rows = $resultfetch()。//$rows = $resultfetchAll()。//$obj = $resultfetchObject()。//echo $objname。// echo $Column = $resultfetchColumn(0)。//得到結(jié)果集的第一個(gè)字段,比如 0為 id號 ,用于只取一個(gè)字段的情況 print_r($rows)。select用法 $db = $thisgetAdapter()。$select = $dbselect()。$selectfrom(‘m_video’, array(‘id’,39。name’,39。clicks’)) where(‘is_guo = :is_guo and name = :name’) order(‘name’)// 按什么排序列,參加為數(shù)組 (多個(gè)字段 )或字符串 (一個(gè)字段 )group()//分組 having()//分組查詢數(shù)據(jù)的條件 distinct()// 無參數(shù),去掉重復(fù)的值。有時(shí)候與 groupby 返回的結(jié)果一樣 limit(10)。// 讀取結(jié)果使用綁定的參數(shù) $params = array(‘is_guo’ = ’1′,’name’=’ 十二生肖奇緣 ’)。//$sql = $select__toString()。//得到查詢語句,可供調(diào)試 $result = $dbfetchAll($select,$params)。執(zhí)行select 的查詢 $stmt = $dbquery($select)。$result = $stmtfetchAll()?;蛴? $stmt = $selectquery()。$result = $stmtfetchAll()。如果直接用 $dbfetchAll($select)結(jié)果一樣 多表聯(lián)合查詢用法 $db = $thisgetAdapter()。$select = $dbselect()。$selectfrom(‘m_video’, array(‘id’,39。name’,39。pic’,39。actor’,39。type_id’,39。up_time’)) where(‘is_guo = :is_guo and is_jian = :is_jian’) order(‘up_time’) limit(2)。$params = array(‘is_guo’ = ’1′,’is_jian’=’1′)。$select join(‘m_type’, ‘ = ’, ‘type_name’)。// 多表聯(lián)合查詢 $videoArray = $dbfetchAll($select,$params)。find()方法 ,可以使用主鍵值在表中檢索數(shù)據(jù) .// SELECT * FROM round_table WHERE id = “1″ $row = $table find(1)。// SELECT * FROM round_table WHERE id IN(“1″, “2″, 3″)$rowset = $table find(array(1, 2, 3))。(2)數(shù)據(jù)刪除總結(jié) 第一種方法:可以刪任意表 //quoteInto($text, $value, $type = null, $count = null)$table = ‘m_video’。// 設(shè)定需要刪除數(shù)據(jù)的表 $db = $thisgetAdapter()。$where = $dbquoteInto(‘name = ?’, ‘ccc’)。// 刪除數(shù)據(jù)的 where條件語句 echo $rows_affected = $dbdelete($table, $where)。// 刪除數(shù)據(jù)并得到影響的行數(shù) 第二種方法:只能刪除本表中的 //delete用法 // delete($where)$where = “name = ‘bbb’”。echo $this delete($where)。// 刪除數(shù)據(jù)并得到影響的行數(shù) (3)數(shù)據(jù)更新總結(jié) 第一種方法:可以更新任意表 // 以 ” 列名 ”=” 數(shù)據(jù) ” 的格式構(gòu)造更新數(shù)組 ,更新數(shù) 據(jù)行 $table = ‘m_video’。// 更新的數(shù)據(jù)表 $db = $thisgetAdapter()。$set = array(‘name’ = ‘ 蝶影重重 ’, ‘clicks’ = ’888′,)。$where = $dbquoteInto(‘id = ?’, ’10′)。// where 語句 // 更新表數(shù)據(jù) ,返回更新的行數(shù) echo $rows_affected = $dbupdate($table, $set, $where)。第二種方法:只能更新本表中的 $set = array(‘name’ = ‘ 蝶影重重 22′, ‘clicks’ = ’8880′,)。$db = $this getAdapter()。$where = $dbquoteInto(‘id = ?’, ’10′)。// where 語句 $rows_affected = $thisupdate($set, $where)。// 更新表數(shù)據(jù) ,返回更新的行數(shù) (4)數(shù)據(jù)插入總結(jié) 第一種方法
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1