X-Google-Language: ENGLISH,ASCII X-Google-Thread: f996b,5280c09988c17578,start X-Google-Attributes: gidf996b,public X-Google-ArrivalTime: 2002-10-15 15:27:30 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!212.75.92.6!not-for-mail From: "Joaquim G�ndara" Newsgroups: alt.ascii-art Subject: Nerd Boy, episode 291 Date: Wed, 16 Oct 2002 00:27:53 +0200 Lines: 41 Message-ID: NNTP-Posting-Host: 212.75.92.6 X-Trace: fu-berlin.de 1034720849 23687726 212.75.92.6 (16 [102694]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com alt.ascii-art:19966 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! ---- Just a crazy idea I got. It was pretty fun to make. :) -- OO Joaquim G�ndara .||. http://www.Nerd-Boy.net bb jg