sprintf(query, "SELECT *FROM history WHERE serialnumber='%s' AND adtcode='%s' LIMIT 1;", dataStr,modulename);
if (!mysql_real_query(mysql, query, (unsigned long)strlen(query))) {
res = mysql_use_result(mysql);
numfields = mysql_field_count(mysql);
while (row=mysql_fetch_row(res)) {
fprintf(outfile, "\r\n");
lengths = mysql_fetch_lengths(res);
fields=mysql_fetch_fields(res);
for (i=0; i
}
}
sel 变量名 = (sel 字段 from table where ...)
select 字段 into 变量 from 表明 where id = i;
set @c =( select count(*) from shul );