Page 1 of 1
Clear blank space at the end of a table ???
Posted: Tue Aug 10, 2004 11:11 pm
by maceved23
Hi I would like to ask if there is a methode to clear the blank space on a php page.
The exact problem is that I create a querry to a DB and when the table has some fields empty I get a blank space.
I need to fix that so the blank space dispeare.
PEASE HELP
MARIO
Posted: Tue Aug 10, 2004 11:31 pm
by hawleyjr
I'm confused by your question. What does your table layout look like? What does your query look like?
Posted: Tue Aug 10, 2004 11:32 pm
by scorphus
In the case of a blank field, make the content of the cell to be   ; instead of the field content. I mean something like this:
Code: Select all
<table>
<tr>
<td><?php echo (empty($row['id']) ? '  ;' : $row['id']); ?></td>
</tr>
</table>
-- Scorphus
Posted: Tue Aug 10, 2004 11:46 pm
by scorphus
It should be without the space before the semi-colon ';' but gets parsed by the forum engine when posting a message with a BBCode. Very odd. BTW, & didn't get parsed!
-- Scorphus
Posted: Wed Aug 11, 2004 12:01 am
by maceved23
HI
I think my question is not clear look here is a link maybe this way it become more clear.
the last info I get from my DB is the one I show, but I get a lot of blank space in the end of the table, thi 'cause I only show the fields that has info in the DB, if all the fields had info the tahle will be full but in this case no.
The link is:
http://www.jahvmcgregor.com.co/temporal/1.htm
HELP IT'S BECOMING A PROBLEM FOR ME
Posted: Wed Aug 11, 2004 7:54 am
by Buddha443556
Showing some code almost always helps too.
It looks like you are outputting empty rows. You may need to use a function like
mysql_num_rows to figure out how many rows you have. You might also use
LIMIT in your SQL to limit how many rows are returned. You'll need to use LIMIT if your going to do any paging of the data.