[Wolves] PHP Sql select losing a row

Wayne Morris waynelists at machx.co.uk
Wed Jul 10 11:56:39 UTC 2013


On 09/07/2013 12:01, David Goodwin wrote:
> 3. Wrapping the while loop in a for loop …. and starting that loop count at 1, instead of 0.

I tried loop count at zero, but made no difference..
> You probably just want : //... mysql_connect(….); mysql_select_db(….); 
> // …. $postcode = mysql_real_escape_string($_GET['postcode']); /* I 
> presume */ $query = "SELECT * FROM property WHERE postcode like 
> '%$postcode%' AND let = '1'"; $result = mysql_query($query); 
> while($row = mysql_fetch_array($result)) { echo "…….blah bah blah 
> {$row['address1']} blah blah blah {$row['address2']} …. \n"; } David. 
> uk/mailman/listinfo/wolves 
Cheers, just the ticket ;-)

Wayne



More information about the Wolves mailing list