watch and learn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi guys my code is as below just look at that and tell me what should i add to have two colomns in my table;
<?php
include ('connect.php');


$query = "SELECT * FROM stockiestandbookingagents order by city,companyname,postalcode";
$result = mysql_query($query) or die("Query failed");


for($e=0;$e<mysql_num_rows($result);$e++)
if($e<mysql_num_rows($result))
{
	print $e+1;
	print "<table border=1>";
	for($r=0;$r<mysql_num_fields($result);$r++)
	if($r<mysql_num_fields($result))
	{
		print "<tr><td><b>";
		echo (mysql_field_name($result, $r));
	}
	if($line=mysql_fetch_array($result, MYSQL_ASSOC))
	{
		foreach($line as $col_value)
		{
			print "</b></td><td>$col_value</td></tr>";
		}
	}
print "</table>";
}

if($_GET[city] == "" && $coloumn == "")
{
print "<a href=StockiestandBookingAgents.php?city=%>click here</a> to see all";
}
else
{
print "<a href=serv01.php>click here</a> to becomeone";
}


	mysql_free_result($result);
	mysql_close($link);
?>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux