Variable No of Records from DB and Table display
Posted: Sat Mar 17, 2012 10:04 am
Hi All
I need to display a variable no of records (user names) from a database/ The max no will be 30 names (could be anywhere from 20-30).
Run across 2 issues:
1. How to dispaly as 6 rows of 5 columns. I tried this:
[1:TempName]\t[2:TempName]\t[3:TempName]\t[4:TempName]\t[5:TempName]\n
[6:TempName]\t[7:TempName]\t[8:TempName]\t[9:TempName]\t[10:TempName]\n
but there's no way to set tab stops so the columns don't align. I don't want to have to 30 test boxes there and run a query 30 times. Anyone got any ideas?
2. Not enough records for place holders
If I have
[1:TempName]\t[2:TempName]\t[3:TempName]\t[4:TempName]\t[5:TempName]\n[6:TempName]
and only have 5 names in the data set, I get "[6:TempName]" in place of the missing record. Anyway way to prevent this?
Only thing I could think of is to construct HTML in my query and return that. Not sure if it would work
Regards
mark
I need to display a variable no of records (user names) from a database/ The max no will be 30 names (could be anywhere from 20-30).
Run across 2 issues:
1. How to dispaly as 6 rows of 5 columns. I tried this:
[1:TempName]\t[2:TempName]\t[3:TempName]\t[4:TempName]\t[5:TempName]\n
[6:TempName]\t[7:TempName]\t[8:TempName]\t[9:TempName]\t[10:TempName]\n
but there's no way to set tab stops so the columns don't align. I don't want to have to 30 test boxes there and run a query 30 times. Anyone got any ideas?
2. Not enough records for place holders
If I have
[1:TempName]\t[2:TempName]\t[3:TempName]\t[4:TempName]\t[5:TempName]\n[6:TempName]
and only have 5 names in the data set, I get "[6:TempName]" in place of the missing record. Anyway way to prevent this?
Only thing I could think of is to construct HTML in my query and return that. Not sure if it would work
Regards
mark