lr_log_message("%s",sql);
mysql_query(db, sql);
results2 = mysql_store_result(db);
while((record = mysql_fetch_row(results2)))
{
lr_log_message("count = %d", record[0]);
}
mysql_free_result(results2);
page = count/10;
lr_log_message("page = %d", page);
for(j=0;j< =page;j++)
{
sprintf(sql, "SELECT * FROM posts_jx3 WHERE tid = %d LIMIT %d,10;",r2,j);
mysql_query(db, sql);
lr_log_message("%s", sql);
if (j>0) {
results2 = mysql_store_result(db);
while((record = mysql_fetch_row(results2)))
{
lr_log_message("pid = %d", record[0]);