sql, query > But it would be so nice to write: > > MySQLConn DB = new MySQLConn ('host', 'port'); > DB.Login('user', 'pass'); > MySQLTransaction X = new MySQLQuery(DB); > > // STL-derived slist: > MySQLResults Results = X.Query("..."); > > // STL map: > map Row; > while (Results.NextRow(Row)) { > cout << "ID: " << Row["ID"] << ", Value: " << Row["Value"] << endl; > } > > ... PS, anyone seen such an API? :)
How about: OpenDatabase(host, database, user, pass); OpenRecordset("select * from blah"); while(RecordsetEOF() != EOF) { printf("ID: %d Value: %s\n", GetField("ID"), GetField("Value")); MoveNext(); } CloseRecordset(); } Look for MyC on mysql.com - if you can't find it, email me directly. The most recent version supports nested SQL, too. The Escapade server-side programming language is built on top of MyC. -- Ed Carp, N7EKG http://www.pobox.com/~erc 214/986-5870 Licensed Texas Peace Officer Computer Crime Investigation Consultant Director, Software Development Escapade Server-Side Scripting Engine Development Team Pensacola - Dallas - London - Dresden http://www.squishedmosquito.com "The whole aim of practical politics is to keep the populace alarmed-- and thus clamorous to be led to safety-- by menacing it with an endless series of hobgoblins, all of them imaginary." -- H. L. Mencken --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php