Quantcast
Viewing latest article 3
Browse Latest Browse All 30

$sodapop->dbConnect($config)

dbConnect() takes care of the db connection.  Somebody's got to do it.
Location: class.sodapop.php

function dbConnect($config) {
$link = mysql_connect(
$config['dbServer'], 
$config['dbUser'], 
$config['dbPass']); 
if (! $link) {
die("Couldn't connect to MySQL");
}
mysql_select_db($config['dbName'] , $link)
or die("Couldn't open" . $config['dbName'] . ": ".mysql_error());
}

Viewing latest article 3
Browse Latest Browse All 30

Trending Articles