Need a Simple Solution

Reply

Join Date: Aug 2006
Posts: 77
Reputation: dss is an unknown quantity at this point 
Solved Threads: 0
dss's Avatar
dss dss is offline Offline
Junior Poster in Training

Need a Simple Solution

 
0
  #1
Sep 22nd, 2006
Hi,
I am having 100 records in my database and i fetch them from database.
Now i am displaying it in table i want to display it like
1 2
3 4

in different td.
But when i give query it echo in stringht line
1
2
3
4

.
Solution to divide it in two td.
Thankx
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 239
Reputation: extofer is an unknown quantity at this point 
Solved Threads: 5
extofer's Avatar
extofer extofer is offline Offline
Posting Whiz in Training

Re: Need a Simple Solution

 
0
  #2
Sep 22nd, 2006
are your trying to formnat the
1 2
3 4
in your HTML or in the Query it self??

what is your current code that returns the straight line, is that your SQL??

What Database are you using, can you create a Cursor??
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 77
Reputation: dss is an unknown quantity at this point 
Solved Threads: 0
dss's Avatar
dss dss is offline Offline
Junior Poster in Training

Re: Need a Simple Solution

 
0
  #3
Sep 22nd, 2006
Originally Posted by extofer View Post
are your trying to formnat the
1 2
3 4
in your HTML or in the Query it self??

what is your current code that returns the straight line, is that your SQL??

What Database are you using, can you create a Cursor??

code
<?php
require_once('../mysql_connect.php');
$query="select * from article_directory order by category asc";
$result=mysql_query($query);
while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{;?>
<tr>
<td><?php echo $row['category'];?></td>
<td><?php echo $row['category'];?></td>
<?php } ;?>



It returns category
i need output like

1category 2category
3category 4category
(assume table structure)

it is returning
1category
2ctegory so on
Thankx
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 54
Reputation: mahe4us is an unknown quantity at this point 
Solved Threads: 0
mahe4us's Avatar
mahe4us mahe4us is offline Offline
Junior Poster in Training

Re: Need a Simple Solution

 
0
  #4
Sep 22nd, 2006
Hi dss,

I understand your doubt. Please review th below URL
http://www.daniweb.com/techtalkforums/thread20917.html

I think the above URL may be useful for you to display the records in your required format.
thanks
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1000 | Replies: 3
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC