this question was answered be me only two days ago. it would be nice to see people
checking before they post.
<?php
$db = mysql_connect('localhost', 'root', '*****');
mysql_select_db('indywebdesign', $db);
$query = 'SELECT * FROM invoices WHERE customerid = $id ORDER BY invoiceid DESC';
$invoices_result = mysql_query($query);
while($result = mysql_fetch_array($invoices_result))
$invoices[] = $result;
?>
--
Chris Lee
[EMAIL PROTECTED]
""WreckRman2"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I am having problems figuring out how to loop to show more then one
record... Any help would be great... All I can get is the first record...
Thanks...
Code:
<?php
$db = mysql_connect("localhost", "root", "*****");
mysql_select_db("indywebdesign",$db);
$invoices_result = mysql_query("select * from invoices WHERE customerid=$id
ORDER BY invoiceid DESC");
$invoices = mysql_fetch_array($invoices_result);
?>
<TR>
<TD BGCOLOR="#EAEAEA"><FONT FACE="Tahoma" SIZE="2"><?php echo
$invoices["date"] ?></FONT></TD>
<TD BGCOLOR="#EAEAEA"><FONT FACE="Tahoma" SIZE="2"><?php echo
$invoices["amount"] ?></FONT></TD>
<TD BGCOLOR="#EAEAEA" COLSPAN="2"><FONT FACE="Tahoma" SIZE="2"><?php
echo $invoices["description"] ?></FONT></TD>
</TR>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]