add app fhctemplate if it does not exist

This commit is contained in:
Harald Bamberger
2024-03-05 17:04:43 +01:00
parent 5ad3510af6
commit 3d6b2eb202
2 changed files with 17 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
// add app fhctemplate
if($result = $db->db_query("SELECT 1 FROM system.tbl_app WHERE app='fhctemplate'"))
{
if($db->db_num_rows($result) === 0)
{
$qry = "INSERT INTO system.tbl_app (app) VALUES('fhctemplate');";
if(!$db->db_query($qry))
echo '<strong>System Tabelle app: '.$db->db_last_error().'</strong><br>';
else
echo '<br>app fhctemplate hinzugefuegt';
}
}