I would like to thanks both Tom Whiting and Mike Barton for replying on this topic. These responses helped me immensely. I was finding bits of code in the Archives, actually this is what inspired me to go in this direction with the mud, but some of the stuff on Kyndig's site helped show me what needed to be done and Mikes answer about copying the results into variables was invaluable.
And thanks to Kyndig for his searchable Code Site :P -----Original Message----- From: Mike Barton [mailto:[EMAIL PROTECTED] Sent: Friday, September 06, 2002 10:02 AM To: Leath, Chad (C.L.); '[email protected]' Subject: Re: MySQL and ROM > I know that MySQL and Rom integration has been discussed on this list for a > while now and I have been trying to implement a few changes on my little > project mud. I have been able to move helps over to a MySQL table and query > the table as needed to look up helps. I have even, mostly anyway, gotten > the Mud to maintain a open connection to the database while it is running > so as not to continually open and close the request. However I was > wondering how would I go to move over things that are not so static as the > help files and that need to be loaded into memory? Does anyone have any > small example , really looking for something short that tells how to run a > query and keep the data in memory, of what they did for things like player > files , areas, or items and mobs? Really you'll end up querying, then copying all of the results from the query into other variables, then freeing the query results. like.... if (mysql_ping(&mysql)) { mysql_query(&mysql, "select level,title from players where name='whoever'"); if ((res = mysql_store_result(&mysql))) { if(row = mysql_fetch_row(res)) { ch->level = atoi(row[0]); ch->title = str_dup(row[1]); } mysql_free_result(res); } } --Palrich. -- ROM mailing list [email protected] http://www.rom.org/cgi-bin/mailman/listinfo/rom

