Home | ___ About | /\ |\ | o) Word. Rants | / \\ | \ ___ ____ _ ||_/_ ___ _ _ , Art | (o |\\| o)_ / ___/ /|| o) / / / OO Merch | \ | \\ / __/ / _ / || / / /_ / .||. Links | \| \/___/_/____/ |__/___/___/ db ------' E P I S O D E 2 9 1 |
|
Order by date | Order by rating MYSQL * link = NULL;
mysql_init(link);
if (!mysql_real_connect(link, host, user, pass, NULL, 0, NULL, 0))
throw Exception("Error connecting to database!");
DataBase db(link); // OO approach
if (USE_SELECT_FUNCTN || !db.select("nerdboy"))
if (!mysql_select_db(link, "nerdboy"))
db.set(link);
else
throw Exception("Error selecting database!");
row = db.query("SELECT * FROM ratings");
if (param.getBitString()==~P_VERBOSE)
cout << "Seeking row[]." << endl;
for (int i = 0; !(i > N || row[i]["strip"] == strip); i++);
if (i == N)
return false;
ofstream temp("templogs..~");
temp << row[i]["mean"] << endl;
if (row[i]["mean"] < 1 || row[i]["mean"] > 6)
throw Exception("Data error");
|\ | _ _ _||) __
| \|(/_| (_||_)(_)\| .
_| Soon in a source code
jg listing near you!
|
Copyright © 2001-2005 Joaquim Gândara. Fan art copyright © their respective owners.