“mysqli connect” Réponses codées

mysqli connect


<?php
$mysqli = new mysqli("localhost","my_user","my_password","my_db");

// Check connection
if ($mysqli -> connect_errno) {

  echo "Failed to connect to MySQL: " . $mysqli -> connect_error;
  
  exit();

  }
?>
Lovely Lemur

mysqli_connect

$con = mysqli_connect("localhost","my_user","my_password","my_db");

// Check connection
if (mysqli_connect_errno()) {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  exit();
}
Engineer Wajid Ali

Réponses similaires à “mysqli connect”

Questions similaires à “mysqli connect”

Plus de réponses similaires à “mysqli connect” dans Sql

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code