Greetings,
I am triying to diplay morethan one column from mysql database by limiting the display into three rows. I want all the row data to be shown as column data. I want the data in the fourth, fith and sixth row to be diplayed in the next columns, and so on.
Example:
A B C
1 10 100
2 11 101
3 12 103
4 13 104
5 14 105
6 15 106
7 16 107
8 17 108
9 18 109
I want the above data to be shown as:
10 11 12 etc
100 101 103
1 2 3
I am a fresh to PHP and mysql. I wrote the following code but it only diplays the first three rows in one column. I want to add another column next to it.
<html>
<head>
<title>Untitled</title>
</head>
<body>
<p> </p>
<?php
print("<font size=\"2\" face=\"Times New Roman\">");
$link = mysql_connect("mysql", "fikir", "yenene");
mysql_select_db("DB1") or die(mysql_error());
$data = mysql_query("SELECT * FROM Table2 LIMIT 3")
or die(mysql_error());
Print "<table border=0>";
while($info = mysql_fetch_array( $data ))
{
Print "<tr>";
Print "</tr><td></tr>".$info . "</td>";
Print "</tr><td></tr>".$info . "</td>";
Print "</tr><td></tr>".$info . "</td>";
}
?>
</body>
</html>
I would greatly appreciate if some one gives me an idea !
Dilnesaw