Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $user ="gino"; #USER
- $password ="pino"; #PASSWORD
- $db ="database"; #NOME DATABASE
- $dbposition="mysql.quellochevoglio"; #URL MYSQL
- $conn = new mysqli("$dbposition", "$user", "$password", "$db");
- global $conn;
- if (!$conn->select_db("$db")) {
- #chili e chili di codice per mostrare una pagina di errore, ma qui la connessione funziona
- } else {
- #SETTO LOCALE MYSQLI
- $conn->query("SET lc_time_names='it_IT'");
- $conn->query("SET time_zone='Europe/Rome'");
- #ANCHE QUI TUTTO BENE
- }
- #ALTRA CHILATA DI CODICE FINO ALLE PRIME SELECT
- $query = "SELECT qualcosa
- FROM `tabella`";
- $result = mysqli_query($conn, $query);
- $count = mysqli_num_rows($result);
- #ERRORE Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in (tutta la path del file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement