php – mysqli – example
function operaceSQL($sql){ $mysql_server = ‚localhost‘; $mysql_databaze = ‚database‘; $mysql_uzivatel = ‚user‘; $mysql_heslo = ‚password‘; $mysqli = new mysqli($mysql_server, $mysql_uzivatel, $mysql_heslo, $mysql_databaze); $operace = strtolower(substr(trim($sql), 0, 6)); switch ($operace) { case „select“: settype($zaznam, ‚array‘); …