<?php function sql($sql) { static $dbh = null; if (!$dbh) { $dbh = new mysqli('localhost', 'root', 'root', 'table'); } return $dbh->query($sql); }
Написал: JustZero (02.03.2015 / 18:05)
<?php function sql($sql) { static $dbh = null; if (!$dbh) { $dbh = new mysqli('localhost', 'root', 'root', 'table'); } return $dbh->query($sql); }