why can't access table by field name in c/c++ API
Posted by:
james cao
Date: February 16, 2011 02:13AM
int f1,f2;
MYSQL_RES *res;
MYSQL_ROW row;
cstring strSql = "select field1,field2 from mytable";
mysql_query(&m_pDBConn, strSql);
res = mysql_store_result(&m_pDBConn);
row = mysql_fetch_row(res);
......
In mysql 5.01(c/c++ API), Why can't access the table with field name?
f1 = row["field1"];
f2 = row["field2"];
We must do it by:
f1 = row[0];
f2 = row[1];
.......
Subject
Views
Written By
Posted
why can't access table by field name in c/c++ API
923
February 16, 2011 02:13AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.