Wed, May 25, 2022
https://devcodepro.comdevcodepro
Home · Latest · Trends
1

ADODB check if MySQL connected

<?php
include ('classes/adodb.inc.php');
$dbdriver = 'mysqli';
$server = 'localhost';
$user = 'root';
$password = 'testpass';
$database = 'dbname';
$conn = ADONewConnection($dbdriver);
$conn->Connect($server, $user, $password, $database);
if (!$conn->isConnected()):
  echo 'No Connected';
  die();
else:
  echo 'Connected';
endif;
?>
rated 1 times (1) (0)
comments: 0 / hits: 350  / 1 year ago, sat, may 1, 21, 05:53:49
More From » PHP
 

Comments

There are no comments for this Snippet yet
Only authorized users can post. Please sign in first, or register a free account
Login with Google
 
Share
Posted
go
Member since May 1, 2021
Total Code Snippets: 2
Total Comments: 0
Location: n/a
go snippets
1 year ago, sun, may 2, 21, 3:34:47
$id = join(',',$val); ##replace with if (!empty($val)) { $id = join(',', $val); }else{ $id = join(',', array_filter(array(@$val))); }
comments: 0 / hits: 1665
PHP