newbie question on C API and multiple queries -
03-28-2005
, 09:57 AM
------=_NextPart_000_0073_01C53374.1C0C05A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
My question is about the C api to mysql, but I couldn't find a list =
specific to the C API, only C++. My hope is this is close enough!
I'm new to writing C to interface with mySQL. I've read the =
documentation in the manual about this and I'm still left wondering =
about something. I assume this is a common issue, but didn't see it =
addressed in the docs or my mailing list searches. Hopefully someone can =
nudge me in the right direction.
In this specific situation, I want to select a list of records and go =
through each one. However, depending on the contents of some of those =
records I may want to change that specific record (and then continue =
stepping through the original select). I know how to do the above, so =
far the C API seems very straight forward.
But what I cant get my head around, is - can you select a list of =
records using mysql_query, get the results with mysql_use_result, and =
while you are stepping through each row with mysql_fetch_row... issue an =
update query on one of the records you get, and then go right back to =
mysql_fetch_row of the original select?
Do I have to open two separate connections to the database with =
mysql_real_connect because the update query will mess up the select =
query currently being stepped through? Or am I ok issuing multiple =
outstanding queries on one connection as long as I use separate =
mysql_res structures?
I would greatly appreciate any advice!
Regards,
Jay West
------=_NextPart_000_0073_01C53374.1C0C05A0-- |