hi. I have some problem that makes me freak. Im building some web application that displays some programming languages in this order on the screen
php | asp | visual basic
.net | perl |
this is all located in table (like main page on hotscripts). if I add some record in database, table above will look like this
php | asp | visual basic
.net | perl | new_record
code for this
<%
While(dr.Read())
%>
<tr>
<td><%Response.Write(dr.Item("fieldname"))%></td>
<td><%If dr.Read() Then Response.Write(dr.Item("fieldname"))%></td>
<td><%If dr.Read() Then Response.Write(dr.Item("fieldname"))%></td>
</tr>
<%
End While
%>
this algorithm works great, but with small problem displaying last record if it is 15th of them, accually algorithm displays picture but not the text (becouse there are no 15th record), but the picture is present...
this isn't the main problem
the main problem
in this table I want (just like on hotscripts) to have in brackets how many posts, or what ever, I have for every program language and I've created SQL query just like this
SELECT Count(*) As num FROM cat WHERE catID=id
id is field from other table where is listed all program languages that needs to be displayed and problem starts here...
when I execute query I get the result like this
PHP (3) | ASP (3) | Visual Basic (3)
and the others are just 0 (zero)... in table that is stored posts for all languages exists just three with catID of 1 which indicates that this is PHP, but like you see this doesen't work...
my question after this very long story is how can I calculate how many posts are in each program laguage and to display it on the page?
sorry if I was boring with this, but this is what I need now and it's very important and I beg you to solve this as soon as you can
I need to inform you that connection to database is ODBCConnection for mySQL database with Driver 3.51 or whatever here goes, ofcourse it is word about ASP.NET

thanks fellas for all your help...