Table trouble


Posted on 16th Feb 2014 07:03 pm by admin

i have been reading the forum for a few weeks and decided to join. i like the format and the advice given is great.

anywho here is my table, the issue i have is that i am displaying pictures from a user on said users profile. pics of items they have within the site.

Did you know?Explore Trending and Topic pages for more stories like this.
they are showing fine, trouble is i cant seem to get them to wrap within the page, they are just making the page wider and wider when more pictures are added instead of wrapping and forming a group rather than a line of images screwing up the page dimensions.

any tips of help, im at a total loss and at my wits end trying to make this work.

$col=$db->query("SELECT iv.*,i.*,it.* FROM collections iv LEFT JOIN items i ON iv.collection_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.collection_userid={$r['userid']} ORDER BY i.itmtype ASC");
if ($db->num_rows($inv) == 0)
{
print "Member has not started a collection";
}
else
{
print "<table width=100% class="table" border="0" cellspacing="1">";
$lt="";
while($i=$db->fetch_row($col))
{
if($lt!=$i['itmtypename'])
{
$lt=$i['itmtypename'];
print "n<tr><td><b>{$lt}</b></td></tr>";
}
if ($i['inv_qty'] > 1)
print"</td><td><img src='colpics/{$i['itmpic']}' height='120' width='120' title='{$i['itmdesc']}'>";
}
}
$h->endpage();
?>
No comments posted yet

Your Answer:

Login to answer
273 Like 6 Dislike
Previous forums Next forums
Other forums

mysql VARCHAR acting like INT
Hi, All.

I have a table that contains a varchar(10) column named weird_field. In this column

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

Problem with an browser game.
Hello,i just joined that great forum and i got php prob,its kinda freaky...anyway i got browser game

Add code to enable passing of checkbox variable on login
Ok, I have a login page, but want to add a checkbox that when checked and successful login is made i

How to know if online site made with PHP
Hello,
I see some sites that does not display extensions at all , for example:

www.site.co

Checking if variable is 0 as opposed to NULL/Empty...
I'm trying to write some code that will retrieve a user's access level from my database and if it do

Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?

This is what I've come up w

If statement help please.
Hello on my site I have 2 content boxes. 1 is for the main content (which is the biggest one) and th

Login Issue's
Code: <?php
$file = fopen('user.txt', 'r');

/* Set login to false initially */

order by date not ID number help php
I am trying to orginize the following code to order by date not id number.
any help would be grea

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash