I wrote:
>This USED to work, then all of a sudden for no apparent reason it has suddenly
>decided not to:
Notwithstanding it used to work, it would _appear_ that calling mysql_free_result()
willy-nilly was the cause:
mysql_query(&mysql, theSql);
res1 = mysql_store_result(&mysql);
if(res1)
{
while((row1 = mysql_fetch_row(res1)))
{
printf(theHtml1, row1[4]);
if(*row1[2] == 'l')
{
sprintf(theSql,
"SELECT so_val, so_text FROM slct_optns WHERE otype_id = %s"
" AND so_val > 0 ORDER BY so_val", row1[1]);
mysql_query(&mysql, theSql);
res2 = mysql_store_result(&mysql);
if(res2)
{
printf("<select name=\"%s\">", row1[5]);
while((row2 = mysql_fetch_row(res2)))
printf("\n<option value=\"%s\">%s</option>", row2[0], row2[1]);
printf("</select>");
mysql_free_result(res2);
}
}
else if(*row1[2] == 'e')
{
printf(" %s <input type=\"text\" name=\"%s\" maxlength=\"%s\">",
row1[3], row1[5], row1[8]);
}
printf("</td>\n</tr>");
}
mysql_free_result(res1);
}
seems to fix the problem..
Regards
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php