Mysqli is a function after php5.
You need to modify the php.ini configuration file
Look for the following statement:
; Extension=php_mysqli.dll
Modify it to: Extension=php_mysqli.dll.
//link Database Select Database$connect=Mysqli_connect(' localhost ', ' root ', ', ' Englishok ') or die(' Unale to connect ');//set the display character set$sql= "Set Names UTF8";//Execute SQL statementMysqli_query($connect,$sql);//Select data table//query single data and output in JSON format$sql= "SELECT * from Cetsix where word= '".$word."‘";//Execute SQL statement to return result set$result=Mysqli_query($connect,$sql);$row=Mysqli_fetch_row($result);EchoJson_encode ($row);================================================$sql= "SELECT * FROM Cetsix";//Execute SQL statement to return result set$result=Mysqli_query($connect,$sql);//getting an array by looping while($row=Mysqli_fetch_row($result)){ $list[]=$row;}Print_r($list);===================================================//create the object and open the connection, and the last parameter is the name of the selected database$mysqli=NewMysqli (' localhost ', ' root ', ' ', ' conn '));//Check if the connection is successfulif(Mysqli_connect_errno()){//Note Mysqli_connect_error () new features die(' Unable to connect! ').Mysqli_connect_error();}$sql= "SELECT * from MSG";//Execute SQL statements, fully object-oriented$result=$mysqli->query ($sql); while($row=$result-Fetch_array ()) { $list[]=$row;}
Basic usage of Mysqlli