PDA

Click to See Complete Forum and Search --> : Return


brianh
Mar 9th, 2001, 01:26 PM
Ok:

I am returning some values from a query. I then take those values and place them in a table. The problem is that when onep of those values is not returned it will not return the entire row. How do I allow some to be blank (cells)?

Cander
Mar 9th, 2001, 01:44 PM
put an if statement to see if the value is = "" and if it is just stick a space or maybe a dash in the cell instead of the value from the database. ie

If rs("myfield") = "" then
response.write "<td>" & "-" & "</td>"
else
response.write "<td>" & rs("myfield") & "</td>"
end if



does that help?

brianh
Mar 9th, 2001, 02:01 PM
It definitely helps but I think that my problem is in the query. I am not that great at SQL. I am pullin records from a few diff tables but am nnot using any join statements, would this be the problem?

Cander
Mar 9th, 2001, 02:48 PM
no its the HTML stuff. I have had the same problem before.

brianh
Mar 9th, 2001, 03:22 PM
I did this:


<% if objRs("Buddy") = "" then
response.write "<td width=70>" & "-" & "</td>"
else
response.write "<td width=70>" & objRs("Buddy") & "</td>"
end if
%>

It diplays all of the dashes then starts the table...

brianh
Mar 12th, 2001, 09:31 AM
Any ideas..... I am getting all of the dashes then the table starts.....