Hey.
I am trying to write a script to output the number of times the string home appears in the field brenchley, this is the scripts I am using
<?php require_once('../Connections/bb4b.php'); ?>
<?php
mysql_select_db($database_bb4b, $bb4b);
$query_home = "SELECT COUNT(*) FROM registration WHERE (brenchley = 'home') ";
$home = mysql_query($query_home, $bb4b) or die(mysql_error());
$row_home = mysql_fetch_assoc($home);
$totalRows_home = mysql_num_rows($home);
?>
<?php
echo ("mysql_free_result = ");
echo mysql_free_result($home);
echo ("<p> </p>");
echo ("home = ");
echo ($home);
?>
The output results i am getting are:
mysql_free_result = 1
home = Resource id #2
I know that there are 2 homes in the field brenchley and that the query works, I have updated my php and this makes no differance.
Cheers Andy