Instead of printing results in one long html table cell, I want to list them in two cells side by side. As I have it now it is REPEATING the data in both cells that are side by side. I don't want this. Should be like below:
Like so:
1 6
2 7
3 8
4 9
5 10
instead of:
1
2
3
4
5
6
7
8
9
10
Here is my current code for the echo:
$conn = mysql_connect("$location","$username","$password");
if (!$conn) die ("Could not connect MySQL");
mysql_select_db($database,$conn) or die ("Could not open database");
$color1 = "#ffffff";
$color2 = "#cccccc";
$row_count = 0;
$sql="SELECT * FROM tours WHERE $show LIKE ('%".addslashes($search)."%') ORDER BY toursDate LIMIT $offset, $sqllimit";
$result=mysql_query($sql);
$numRows = mysql_num_rows($result);
$error = mysql_error($conn);
if($error)
{ echo("SQL : $sql<p>Error : $error<p>"); }
if (mysql_num_rows($result)<1)
{ echo("<table border='0' cellspacing='0' cellpadding='0' width='750'><tr><td class='title'><strong>Sorry, no matches could be found at this time.</strong><br><br></span></td></tr></table>"); }
else
{
echo("<table border='0' cellspacing='0' cellpadding='0' width='750'><tr><td><table border='0' cellspacing='1' cellpadding='2' width='100%'><tr><td colspan='3' class='title'><strong>Search results for \"<span class='titlered'>$search</span>\"</strong><br><br></td></tr><tr><td class='text'><strong>Artist</strong></td><td></td><td class='text'><strong>Artist</strong></td></tr>");
$counter=0;
while(($counter<$limit)&&($row = mysql_fetch_array($result)))
{
$id = $row["toursID"];
$artist = $row["toursArtist"];
$date = $row["toursDate"];
$city = $row["toursCity"];
$state = $row["toursState"];
$venue = $row["toursVenue"];
$row_color = ($row_count % 2) ? $color1 : $color2;
echo "<tr><td bgcolor=$row_color class='text'>$artist</td>";
echo "<td> </td>";
echo "<td bgcolor=$row_color class='text'>$artist</td></tr>";
$counter++;
$row_count++;
}
echo "</table></td></tr></table>";
}