Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

heroku mysql

<?php
$url = parse_url(getenv("CLEARDB_DATABASE_URL"));

$server = $url["host"];
$username = $url["user"];
$password = $url["pass"];
$db = substr($url["path"], 1);

$conn = new mysqli($server, $username, $password, $db);
?>
Source by devcenter.heroku.com #
 
PREVIOUS NEXT
Tagged: #heroku #mysql
ADD COMMENT
Topic
Name
6+6 =