???????????????????????
???????????? ???????[ 2016/6/22 10:54:45 ] ????????????? MySQL
???????????????????????????
????new mysqli("??????????"??"?????"??"????"??"?????????");
?????ж??????????
????1.mysqli_connect_error()
????2.!mysqli_connect_error() or die("error!");
???????SQL?????????????
????mysqli_query()???????????????????????
???????select?????????????mysqli_result???????????????????true??false
???????????????ж??????
????mysqli_fetch_all() ??????????????????е??
????mysqli_fetch_array() ?????????????????????
????mysqli_fetch_assoc() ?????????????????????????????????
????mysqli_fetch_object() ???????
????mysqli_fetch_row() ?????????????????????????
????????mysqli????
????mysqli_affected_rows()????????Msql????????????????
????mysqli_connect_error()????????????????????????
????mysqli_field_count()???????β??????????е????
????mysqli_insert_id()?????????insert??????????id
?????????????????
????????????????д.class.php
????sql???
????1.????????
????insert into Brand values('b001'??'????5'); #???????
????insert into Brand (Code) values('b002');#???????
????insert into PinPai values(''??'????'); #????????????
????2.?????
????select * from PinPai #???????????
????select * from PinPai where Ids = 1;#???????????
????3.???????
????update PinPai set Name = '????' where Ids = 4; #???????????
????update Car set Name='????'??Time='2012-3-4'??Price=16??Brand='b002' where Code='c001'
????4.???????
????delete from Brand #???????????
????delete from PinPai where Ids = 4; #???????????????
????5.??????
????select * from ChinaStates where AreaName like '??%' #??????п????
????select * from ChinaStates where AreaName like '%??%' #?????????????
????select * from ChinaStates where AreaName like '_??%' #???????????λ?ó????????
????6.??????
????select * from Car order by Code desc #desc???? asc ????
????select * from Car order by Brand
????select * from Car order by Brand??Powers #??????????????
????7.???????????????
????select count(Code) from Car #?????????
????select max(Price) from Car #??????
????select min(Price) from Car #???С?
????select avg(Price) from Car #???????
????select sum(Price) from Car #??????
????8.??????
????select Code??Brand??count(*) from Car group by Brand #??????з????????????????
????select * from Car group by Brand having count(*) >2 #??????????????????????2??
????9.??????
????select * from Car limit 5??5 #?????????????????????
????10.?????
????select distinct Nation from Info
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11