hi all.....
i have a problem...that i want to display my db records in columns like the flowing link
http://www.amazon.com/ref=topnav_gw_hg/ ... 86-1292050
u will find that there 3 record in each row so when the 4th record start it display in the other row...
plz some one help....
thanks in advance.....
how i can show record colum wiz
Moderator: General Moderators
-
khubaib.php
- Forum Newbie
- Posts: 6
- Joined: Sun Mar 11, 2007 9:50 am
-
khubaib.php
- Forum Newbie
- Posts: 6
- Joined: Sun Mar 11, 2007 9:50 am
code plz
plz can u explain it with the code i will be very thanks full to u ....
the code will be something like
Code: Select all
$_query = "select myItem from myThing where blah=blah";
$_results =mysql_query($_query);
$_i = 0;
echo "<TABLE><TR>";
while ($_row = mysql_fetch_assoc($_results)) {
if ($_i > 0 && $_i % 3 == 0) {
echo "</TR><TR>";
}
echo "<TD>" . $_row["myItem"] . "</TD>";
$_i++;
}
echo "</TR></TABLE>";- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
Look at mysql_fetch_array() and http://www.php.net/manual/en/language.o ... rement.php. If you don't know how to construct HTML tables, pay a visit to your favorite search engine.
-
khubaib.php
- Forum Newbie
- Posts: 6
- Joined: Sun Mar 11, 2007 9:50 am
thnks alot for helping
thanks a lot for helping me
-
khubaib.php
- Forum Newbie
- Posts: 6
- Joined: Sun Mar 11, 2007 9:50 am
how can i show more then one record
hey....
the code u just give me is showing one record in each column.....how i can display for example book image and book price and book author in one col om just like this link
http://www.amazon.com/b/ref=amb_link_42 ... ode=172635
u will see in this web page there is an image for the product and then the name of product and then there is it price i want to do just like that....
thanks in advance...
the code u just give me is showing one record in each column.....how i can display for example book image and book price and book author in one col om just like this link
http://www.amazon.com/b/ref=amb_link_42 ... ode=172635
u will see in this web page there is an image for the product and then the name of product and then there is it price i want to do just like that....
thanks in advance...