I am trying to write my first script and Im wanting to fetch a string 'home' from a field in my database. But i keep getting this error on my fetch record. Here is the script, anyone know where im going wrong???
<?php
FileName="Connection_php_mysql.htm"
Type="MYSQL"
HTTP="true"
$hostname_test = "localhost";
$database_test = "bb4b";
$username_test = "root";
$password_test = "";
$test = mysql_pconnect($hostname_test, $username_test, $password_test) or die(mysql_error());
?>
<?
mysql_select_db($database_test, $test);
$query_Recordset1 = "SELECT COUNT(*) FROM registration WHERE (brenchley = 'home')";
$Recordset1 = mysql_query($query_Recordset1, $test) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?
echo ($Recordset1);
?>
<body>
</body>
</html>
This is the error
Fatal error: Call to undefined function: mysql_fetch_assoc() in c:\program files\apache group\apache\htdocs\test1.php on line 17
Can any1 help. thanks
Andy
BB4B