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.
Was bekommst du denn für einen Fehler?funktioniert scheinbar nicht
$v1 = isset($_POST['v1']) ? $_POST['v1'] : "";
$v2 = isset($_POST['v2']) ? $_POST['v2'] : "";
$v1exp = explode(".", $v1);
$v2exp = explode(".", $v2);
if($v1exp[3] > $v2exp[3]) {
$v1 = implode(".", $v2exp);
$v2 = implode(".", $v1exp);
$a = $v2exp[3];
$v2exp[3] = $v1exp[3];
$v1exp[3] = $a;
}
$base = $v1exp[0].".".$v1exp[1].".".$v1exp[2];
/* Releases[] mit ID und Version aller relevanten Releases befüllen */
$abf="SELECT ID, version FROM releases WHERE version LIKE \"".$base.".%\" AND SUBSTRING_INDEX(version, \".\", -1) BETWEEN ". $v1exp[3] ." AND ". $v2exp[3] ." ORDER BY SUBSTRING_INDEX(version, \".\", -1)";
$qry = mysql_query($abf) or die(mysql_errno().": ".mysql_error());
while($row = mysql_fetch_assoc($qry)) {
$rel = preg_replace("/\.([0-9]{1})$/", '.0$1', $row['version']);
$releases[] = array("version" => "$rel", "ID" => (int)$row['ID']);
}
array_multisort($releases);
foreach($releases as $index => $rel) {
$releases[$index]['version'] = preg_replace("/\.([0]([0-9]{1}))$/", '.$2', $rel['version']);
}
foreach($releases as $index => $rel) {
$qry = mysql_query("SELECT `dateiversionID` AS dvID FROM `releasedateien` WHERE `releaseID` = " . $rel['ID'] . " ORDER BY dvID") or die(mysql_errno().": ".mysql_error());
while($row = mysql_fetch_assoc($qry)) {
$releases[$index]['dateien'][] = $row['dvID'];
}
}
print_r(compareReleases($releases));
SELECT ID, version FROM releases WHERE version LIKE '4.12.1%' AND SUBSTRING_INDEX(version, ".", -1) BETWEEN 4 AND 13 ORDER BY SUBSTRING_INDEX(version, ".", -1)
$abf = 'SELECT ID, version FROM releases WHERE version LIKE \'' . $base .'%\' AND SUBSTRING_INDEX(version, ".", -1) BETWEEN ' . $v1exp[3] . ' AND ' . $v2exp[3] .' ORDER BY SUBSTRING_INDEX(version, ".", -1)';
SELECT ID, version FROM releases WHERE version LIKE '4.12.1%' AND SUBSTRING_INDEX(version, ".", -1) BETWEEN 4 AND 13 ORDER BY LPAD(SUBSTRING_INDEX(version, ".", -1), 2, '0')
SELECT ID, version FROM releases WHERE version LIKE '4.12.1%' AND SUBSTRING_INDEX(version, ".", -1) BETWEEN 4 AND 13 ORDER BY CONVERT(SUBSTRING_INDEX(version, ".", -1), SIGNED)
LIKE '4.12.1.%'