Member Panel


Sponsors and Ads

Join the Team

Live Tag Cloud

PC Forum PC Help Forum » Web & Networking » Web Design » fetch array in a 3x3 table

Web Design - fetch array in a 3x3 table posted in the Web & Networking forums; right i am trying to display some images that i have stored in my database, I have got them so that they will display in one column down the page ...

JOIN US NOW to remove these Ads

Post New Thread  Reply
  #1  
Old 01-02-2007
Elite Member
My PC
 
Join Date: Nov 2004
Location: Top Secret... really
Posts: 527
spellbyte - See this Members User comments on their Profile page
Send a message via MSN to spellbyte Send a message via Skype™ to spellbyte
Default fetch array in a 3x3 table

right i am trying to display some images that i have stored in my database, I have got them so that they will display in one column down the page but i want them to show in a 3x3 table,
the info has to be exported from the db as i will be making many changes through my admin panel, can anyone help me with this problem


  #2  
Old 01-07-2007
GaRHaR's Avatar
Elite Member
My PC
 
Join Date: Jul 2006
Location: Western Australia
Posts: 6,095
PC Experience: Elite PC Guru
GaRHaR - See this Members User comments on their Profile page GaRHaR - See this Members User comments on their Profile page GaRHaR - See this Members User comments on their Profile page GaRHaR - See this Members User comments on their Profile page GaRHaR - See this Members User comments on their Profile page GaRHaR - See this Members User comments on their Profile page
Send a message via ICQ to GaRHaR Send a message via MSN to GaRHaR Send a message via Yahoo to GaRHaR
Default

Hi spellbyte, sorry noone has seen this post earlier...

I'm not exactly sure what the problem is...what software are you using the create the database? and what software are you trying to extract the information with?


__________________


"Study without desire spoils the memory, and it retains nothing that it takes in."
- Leonardo da Vinci

"I believe in Christianity as I believe that the sun has risen: not only because I see it, but because by it I see everything else."
- C. S. Lewis
  #3  
Old 01-07-2007
Elite Member
My PC
 
Join Date: Nov 2004
Location: Top Secret... really
Posts: 527
spellbyte - See this Members User comments on their Profile page
Send a message via MSN to spellbyte Send a message via Skype™ to spellbyte
Default

thanks for the reply GaRHaR

the database is mysql driven and im projecting the info with PHP,
I have now managed to get the grid displaying 3x3 but for some reason it's displaying more than 9 images.

this is the code im using
Code:
print "<h3><b>Browsing items in the Gallery...</b></h3>";
$cnt=mysql_query("SELECT gID FROM galleryitems",$c);
$pics=mysql_num_rows($cnt);
$pages=(int) ($pics/9)+1;
if($pics % 9 == 0)
{
$pages--;
}
print "Pages: ";
for($i=1;$i <= $pages;$i++)
{
$stl=($i-1)*9;
print "<a href='gallery.php?by=$by&ord=$ord'>$i</a>&nbsp;";
}
$q=mysql_query("SELECT gi.*,i.* FROM galleryitems gi LEFT JOIN items i ON gi.gITEMID=i.itmid ORDER BY i.itmtype ASC, i.itmbuyprice ASC, i.itmname ASC LIMIT 9",$c) or die(mysql_error());
$no1=$st+1;
$no2=$st+9;
print"
Showing users $no1 to $no2 by order of $by $ord.
<table width=75% border=2>";
while($r=mysql_fetch_array($q))
{
print "<tr><td><img src='{$r['itmpic']}' width='75' height='75'><br />{$r['itmname']}</td>";
print "</tr>";
}
print "</table>";



Reply
Satellite TV on your PC - over 3000 Channels! Click Here!

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT +1. The time now is 06:15 AM.
Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC7
All Graphics & Content Copyright © 2004-2008 - PC Help Forum.com


Back to Top
Credit Score
Check your free credit score online.

Car Finance
Looking for finance for a car? Money Expert can find the right loan deal for you.

Advertising
Join the free co-op advertising network and increase your traffic.