|
#1
|
|||
|
|||
PDO addon
PHP Code:
PDO connection works remove the query once you see it working an update to PDO standards good luck |
#2
|
|||
|
|||
lol
|
#3
|
|||
|
|||
Code:
//PDO $hostname='localhost'; $username='root'; $password=''; try { $pdo = new PDO("mysql:host=$hostname;dbname=torrentbeta",$username,$password); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // <== add this line //echo 'Connected to Database'; echo "Access Connected"; $pdo = null; } catch(PDOException $e) { echo $e->getMessage(); } |
#4
|
|||
|
|||
addon ?
__________________
Need HELP!? I can install:
|
#5
|
|||
|
|||
Code:
function setupDatabase() { // put your database information mentioned above here $username = 'root'; $password = 'root'; $host = 'localhost'; $dbname = 'verify'; try { $pdo = new PDO("mysql:host=$host;dbname=$dbname",$username,$password); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch(PDOException $e) { return 'ERROR: ' . $e->getMessage(); } return $pdo; } |
Tags |
addon , pdo |
|
|