//----------DBLINK get_link; returns database link
/*
function get_link() {
$mysql_link = mysql_connect("localhost", "subdomain", "vankern4n");
mysql_select_db("rebelsquadrons", $mysql_link);
return $mysql_link;
}
*/
/*$mysql_link = get_link();*/
// RESULT getResult; returns result for query and sets reference passed &$cnt with # of results
function getResult($query,&$cnt,$ubersort = ""){
global $mysql_link;
if($ubersort != "NULL" && $ubersort != "") {
$query .= " ORDER by " . $ubersort;
}
$result = mysql_query($query, $mysql_link);
if(!$result) die("getResult($query) - RS SQL ERROR: " . mysql_error());
//print("$query \n");
$cnt = mysql_num_rows($result);
return $result;
}
/*function query($query){
global $mysql_link;
mysql_query($query, $mysql_link);
if(mysql_error() != "") die("query($query) - RS SQL ERROR: " . mysql_error());
}*/
// array getVal; returns array of values for paticular row
function getVals($result){
return mysql_fetch_row($result);
}
function getRow($query){
$result = getResult($query,$cnt);
return mysql_fetch_row($result);
}
function count_rows($query){
getResult($query,$rows);
return $rows;
}
function get_name($pin){
if ($pin == 0) { return "TBA"; }
$val = getRow("select Name from Roster where ID=$pin");
return $val[0];
}
?>
Rebel Squadrons - Order of Battle - Browse
Fatal error : Uncaught Error: Call to undefined function mysql_fetch_assoc() in /var/www/vhosts/rebelsquadrons.org/httpdocs/oob/classes2.php:22
Stack trace:
#0 /var/www/vhosts/rebelsquadrons.org/httpdocs/oob/classes2.php(17): ship->generate_data()
#1 /var/www/vhosts/rebelsquadrons.org/httpdocs/oob/browse2.php(164): ship->ship('20')
#2 {main}
thrown in /var/www/vhosts/rebelsquadrons.org/httpdocs/oob/classes2.php on line 22