Hi,
I am having a parse error with the codes below but my eyes just cant seem to find anything wrong. Hope somebody out there can help me.
<html>
<head>
<title>Using mysql_num_rows()</title>
</head>
<body>
<?php
$user = "";
$pass = "";
$db = "";
$link = mysql_connect( "localhost", $user, $pass );
if ( ! $link ) {
die( "Couldn't connect to MySQL" );
}
mysql_select_db( $db, $link ) or die ( "Couldn't open $db: ".mysql_error() );
$theacacaname=mysql_query("SELECT NAME FROM cgpa WHERE NAME = 'vanie'");
while ($row=mysql_fetch_assoc($theacacaname))
{
echo "NAME: {$row['NAME']}";
}
$result = mysql_query("SELECT cgpa.NAME, cgpa.STATUS, cgpa.RESULTS, cgpa.MATRIX FROM cgpa,cgpa1 WHERE cgpa1.NAME = '$theacacaname' AND cgpa.STATUS=cgpa1.STATUS AND cgpa.RESULTS=cgpa1.RESULTS AND cgpa.MATRIX=cgpa1.MATRIX;";);
$num_rows = mysql_num_rows( $result );
while ($row=mysql_fetch_assoc($result))
{
echo "MATRIX: {$row['MATRIX']}";
}
mysql_free_result($result);
mysql_free_result($theacacaname);
?>
:)