Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
// Connect to Database
$mysqli = new mysqli($src_shop->dbHost, $src_shop->dbUser, $src_shop->dbPwd, $src_shop->dbName);
echo "Db connection establishedat: {$timer->get()}<br \> " ;
// Create an sql command structure for creating a table
$tableCreate = "CREATE TABLE IF NOT EXISTS test_tbl (
id int(11) NOT NULL auto_increment ,
RandomTxt TEXT ,
PRIMARY KEY (id)
) ";
// This line uses the mysqli_query() function to create the table now
$queryResult = mysqli_query($mysqli , $tableCreate);
echo "Table created at: {$timer->get()}<br \> " ;
// Create a conditional to see if the query executed successfully or not
if ($queryResult === TRUE) {
for ($i = 1; $i <= 1000; $i++) {
mysqli_query($mysqli , "INSERT INTO test_tbl (RandomTxt) VALUES ('abcdefghklmnopqrsst')");
}
} else {
print "<br /><br />No TABLE created. Check";
}
echo "Data inserted into the table at: {$timer->get()}<br \> " ;
$result = mysqli_query($mysqli , 'SELECT * FROM test_tbl') ;
$arrayResults = array() ;
while ($row = $result->fetch_assoc()) {
array_push($arrayResults , $row['RandomTxt']);
}
echo "Data is read from table and inserted into an array at: {$timer->get()}";