I've got a routine that queries a MySQL database and outputs the sorted
results to a web page (script snippet below.) How can I output the exact
same thing to a txt file using this script?
<?
$count = 0;
$result = mysql_query ("SELECT * FROM listings ORDER by a
DESC");
if ($row = mysql_fetch_array($result)) {
do { ?>
<? echo $row['company_name']; ?>
<? echo $row['agent_name']; ?>
<? echo $row['county']; ?>
<? echo $row['city']; ?>
<br>
<? echo $row['mls']; ?>
$<? echo number_format($row['price'], ","); ?>
<? echo $row['area']; ?>
<br>
<? echo $row['copy']; ?>
<br>
<? echo $row['agent_name']; ?>
<p>
<?
$count++;
if ($count == 8) {
echo "<hr><b>Page Break</b><hr><p>";
$count = 0;
}
}
while($row = mysql_fetch_array($result));
mysql_close(); } ?>
Thanks in advance for any ideas
Ed
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php