File size: 990B
<?
/*
* Animated Collapsible DIV- © Dynamic Drive DHTML code library (www.pokazuha.tv)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.pokazuha.tv/ for this script and 100s more
* Last Update : Tuesday, November 13 2005
*/
require_once("config.php");
function db_connect()
{
mysql_connect(DATABASE_SERVER,DATABASE_USER,DATABASE_PASSWORD)
or die("Connection error: ".mysql_error());
mysql_select_db(DATABASE_NAME)
or die("Database not found: ".mysql_error());
return 0;
}
function db_close()
{
mysql_close();
}
function db_query($query)
{
$result = mysql_query($query) or die("<h4>Incorrect query:</h4> <b><font color=\"red\">".mysql_error()."</b><br><strong>[STOPED]</strong><font>");
return $result;
}
function db_getrows($resource)
{
$data = array();
if (mysql_num_rows($resource) != 0)
{
while ($row = mysql_fetch_assoc($resource))
$data[] = $row;
return $data;
}
else
return array();
}
?>