Page 2 of 2
Re: Print to file from php while loop
Posted: Wed Jul 30, 2014 9:22 am
by Celauran
I'm not surprised. Like I said, it looks like your query isn't returning anything. Try echoing inside the loop and see if you get anything. I suspect you won't. Or just check how many rows are returned using
mysql_num_rows()
Re: Print to file from php while loop
Posted: Wed Jul 30, 2014 9:39 am
by scoobysteve
I dont understand because the code I used for the echo is the same as your code see below. And the echo works. so the query must be working ??
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("cl49-listings", $con);
$result = mysql_query("SELECT * FROM tblproperties where icon1 = 'Active'");
while($row = mysql_fetch_array($result))
I placed my echo here and it works when I place your $output code it does not. ?
Re: Print to file from php while loop
Posted: Wed Jul 30, 2014 9:42 am
by Celauran
scoobysteve wrote:so the query must be working ??
Don't assume. Check.
Re: Print to file from php while loop
Posted: Wed Jul 30, 2014 1:27 pm
by scoobysteve
all sorted now, Thank you so much guys its really appreciated. you guys rock cheers.
Steve