hi,

i found a strange user comment in the current documentation of c api
for mysql_real_connect.
http://www.mysql.com/doc/en/mysql_real_query.html

"If a result set (MYSQL_RES) is in use, then mysql_free_result(...)
must be called before a call to this function will be successful."

if this is true, my question is:
need i open a new connection for _query2_ ?
for example:

conn=mysql_real_connect(...);
//query 1
mysql_real_query(conn,"select CustomerId from Invoices",xx);
result=mysql_use_result(conn);
while (...) {
  //query 2
  mysql_real_query(conn,\
  "select Name from Customers where CustomerId=id_from_query1),xx);
  ....
}

ps: i know, this is easyer with a simple join, but this is just a
dummy example...

thanks,
ati


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to