Hi there everyone --
I have written a bit of code that returns the values I requested ... the problem is it
seems to loop as many times as there is entries! I believe the SQL syntax is correct and am besides myself at the moment. any help would be greatly appreciated.
here's the code!
<script language="php">
// create the SQL query's...
$sql = "SELECT customer_info.name, customer_info.email, customer_info.customer_id,
requests.color_from,requests.color_to,requests.carat_from,
requests.carat_to,requests.clarity_from,requests.clarity_to,
requests.shape,requests.message
FROM
customer_info, requests";
$sql_result = mysql_query($sql,$conn)
or die("Couldn't execute query.");
// begin results formatting
echo "<TABLE BORDER=1 width='600'>";
echo "<TR>
<TH>name</TH>
<TH>email</TH>
<TH>customer_id</TH>
<TH>Color_from</TH>
<TH>Color_to</TH>
<TH>Carat_from</TH>
<TH>Carat_to</TH>
<TH>Clarity_from</TH>
<TH>Clarity_to</TH>
<TH>Shape</TH>
</TR> ";
while ($row = mysql_fetch_array($sql_result)) {
//assign variables to a row array.
$customer_id = $row["customer_id"];
$name = $row["name"];
$email = $row["email"];
$Color_from = $row["color_from"];
$Color_to = $row["color_to"];
$Carat_from = $row["carat_from"];
$Carat_to = $row["carat_to"];
$Clarity_from = $row["clarity_from"];
$Clarity_to = $row["clarity_to"];
$Shape = $row["shape"];
$message = $row["message"];
echo "<TR>
<TD>$name</TD>
<TD>$email</TD>
<TD>$customer_id</TD>
<TD>$Color_from</TD>
<TD>$Color_to</TD>
<TD>$Carat_from</TD>
<TD>$Carat_to</TD>
<TD>$Clarity_from</TD>
<TD>$Clarity_to</TD>
<TD>$Shape</TD>
</TR>";
}
echo "</TABLE>";
</SCRIPT>
thanks again
Chris