当前位置: 技术问答>linux和unix
mysql怎么得到字段的值
来源: 互联网 发布时间:2015-03-28
本文导语: MYSQL_RES *result; if (mysql_query(mysql, "select * from student") == 0) { result = mysql_store_result(mysql); if (result == NULL) { printf("no record"); } else { MYSQL_ROW row; row = mysql_fetch_row(result); while(row!=NULL) { row = mysql_fetch_row(result); 请问...
MYSQL_RES *result;
if (mysql_query(mysql, "select * from student") == 0)
{
result = mysql_store_result(mysql);
if (result == NULL)
{
printf("no record");
}
else
{
MYSQL_ROW row;
row = mysql_fetch_row(result);
while(row!=NULL)
{
row = mysql_fetch_row(result);
请问在这里该怎么得到字段的值???
}
}
}
if (mysql_query(mysql, "select * from student") == 0)
{
result = mysql_store_result(mysql);
if (result == NULL)
{
printf("no record");
}
else
{
MYSQL_ROW row;
row = mysql_fetch_row(result);
while(row!=NULL)
{
row = mysql_fetch_row(result);
请问在这里该怎么得到字段的值???
}
}
}
|
看手册吧