????????????????mysql??mysqli?????????????????:
????mysqli?????????????MySQL????????
????mysql???????????????????????????′?????μ???????
????mysqli??????????????????????
?????????????????????????????????????
????????????mysql???????????????????mysql_pconnect()???????
????mysqli??????????????
????$conn = mysqli_connect(‘localhost’?? ‘root’?? ’123′?? ‘db_test’) or (‘error’);
????$sql = “select * from db_table”;
????$query = mysqli_query($conn??$sql);
????while($row = mysqli_fetch_array($query)){
????echo $row['title'];
????}
????mysqli??????????????
????$conn = mysqli(‘localhost’?? ‘root’?? ’123′?? ‘db_test’);
????$sql = “select * from db_table”;
????$query = $conn->query($sql);
????while($row = $query->fetch_array()){
????echo $row['title'];
????}
????mysql_connect??mysql_pconnect??mysqli_connect??
????mysql_pconnect?????????????????????mysql_close?????????????????Ч????
???????????????????????′????????????????????????????
?????????????????????PHP??????????????????????????????????????????????
?????????????????????????????????????
???????????????????Щ??棬????Щ?????
????????????????????????????????????mysql??max_connections?????????? ???????mysql_connect()???????
???????????MySQL_pconnect????????php??MySQL?佨??????????????
???????php???????????????????????????????? ??????н???????????????.
??????MySQL_pconnect???????????? MySQL_connect??ζ??????????tcp ??
??????sql??????????????? ????????????????????????????.
???????pconnect??? ??????????MySQL??? php??????????????????????(?????????????????????????MySQL??????)?????????
????????е????????????????? ?????????????????????????????????????
???????????????? MySQL_pconnect?????????????????.
????connect??pconnect??????????????? ????????????.
???????php?????????????? ??????cgi???У? ???????apache?????????.
???????cgi?????connect??pconnect???????? ??????cgi???????н???????????????????.
????php???apache??鷽???????? ????????????????????? ??????????????????
??????php??????????cgi????????pconnection??????????Ч??
??????????????????????????????????????????????
????????????apache??????????????????????………………
?????????????????????
???????????????mysql_connect????????н??????????ж???????????ɡ? ????????mysql_connect??mysql_pconnect??????????????????????????? ?????????????mysql_connect ?? mysql_pconnect???? ?????????????????????????????????mysqli_connect?????mysqli?????????????
????????mysqli??????????????????