第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

PHP與MySQL關(guān)系大揭秘

難度初級(jí)
時(shí)長(zhǎng) 2小時(shí)58分
學(xué)習(xí)人數(shù)
綜合評(píng)分9.80
299人評(píng)價(jià) 查看評(píng)價(jià)
9.9 內(nèi)容實(shí)用
9.8 簡(jiǎn)潔易懂
9.7 邏輯清晰
$r = mysqli_query($c, $s);
1,$s為insert, update, delete時(shí),$r為true或false;
2,$s為select時(shí),$r為resultSet或false;
1,$c = mysqli_connect($h, $u, $p);
2,mysqli_select_db($db);
3,$r = mysqli_query($c, $s);
4,$num = mysqli_num_rows($r);
5,$row = mysqli_fetch_row($r);
6,$row = mysqli_fetch_assoc($r);
7,$row = mysqli_fetch_array($r);
8,$n = mysqli_affected_rows($c);
9,mysqli_close($n);
//fetch the num of rows of the result
$nums = mysqli_num_rows($rs);
if($rs && mysqli_num_rows($rs))
//query database as object
$rs = mysqli_query($conn, $queryString);
while($row = mysqli_fetch_object($rs)){
echo $row->name$row->age->fuck you <br>;
}
mysqli_fetch_array($rs, MYSQLI_NUM); //索引數(shù)組 == mysqli_fetch_row($rs)
mysqli_fetch_array($rs, MYSQLI_ASSOC); //關(guān)聯(lián)數(shù)組 == mysqli_fetch_assoc($rs)
mysqli_fetch_array($rs, MYSQLI_BOTH); //混合數(shù)組 == mysqli_fetch_array($rs)
mysqli_query("set names utf8"); //設(shè)置插入和檢索數(shù)據(jù)庫(kù)的字符的格式為utf8
header("Content-Type:text/html;charset=utf8"); //用于設(shè)置頁(yè)面文檔的顯示格式
//get the result set
$rs = mysqli_query($conn, $s);
while($row = get_every_row($rs)){ //do sth with array $row }
1, mysqli_fetch_row(); 索引數(shù)組
2, mysqli_fetch_assoc(); 關(guān)聯(lián)數(shù)組
3, mysqli_fetch_array(); 不知啥數(shù)組
4, mysqli_fetch_object(); 對(duì)象
//query database
$rs = mysqli_query($conn, $queryString);
while($row = mysqli_fetch_array($rs)){
//do sth by $row
}
//query database
$rs = mysqli_query($conn, $queryString);
//select database
mysqli_select_db($conn, 'test');
//close the database
mysqli_close($conn);
不會(huì)做就選最長(zhǎng)的,靠譜兒。
//mysqli
$conn = mysqli_connect($hostname, $username, $password) or die('fuck you');
mysqli_select_db($dbname);
mysqli_query('set names "utf8"');
//PDO--php data object
$conn = new PDO("mysql:dbname=$dbname;host=$hostname", $username, $password);
//判斷是否支持某種數(shù)據(jù)庫(kù)
if(function_exists('mysqli_connect')){
echo 'mysqli extension has been installed.<br>';
}
//connect database
$conn = mysqli_connect('localhost', 'root', '');
if($conn){
echo 'connect success.<br>';
}else{
exit('connect failed');
}
$con=mysqli_connect('127.0.0.1','root','123456')
$con->query('insert into imo(names,pwd)VALUES ("345","qwe")');
課程須知
本課程是PHP中級(jí)課程 1、掌握PHP開(kāi)發(fā)語(yǔ)言的基礎(chǔ)語(yǔ)法知識(shí) 2、掌握MYSQL數(shù)據(jù)庫(kù)中基礎(chǔ)的增刪改查語(yǔ)句
老師告訴你能學(xué)到什么?
1、精通最基本的PHP內(nèi)置mysql函數(shù) 2、掌握對(duì)數(shù)據(jù)庫(kù)增刪改查的步驟 3、熟悉簡(jiǎn)單文章發(fā)布系統(tǒng)的開(kāi)發(fā)流程 4、學(xué)會(huì)分析相似系統(tǒng),實(shí)現(xiàn)舉一反三

微信掃碼,參與3人拼團(tuán)

微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)

友情提示:

您好,此課程屬于遷移課程,您已購(gòu)買(mǎi)該課程,無(wú)需重復(fù)購(gòu)買(mǎi),感謝您對(duì)慕課網(wǎng)的支持!

本次提問(wèn)將花費(fèi)2個(gè)積分

你的積分不足,無(wú)法發(fā)表

為什么扣積分?

本次提問(wèn)將花費(fèi)2個(gè)積分

繼續(xù)發(fā)表請(qǐng)點(diǎn)擊 "確定"

為什么扣積分?

舉報(bào)

0/150
提交
取消