Can anyone help with this query?
Posted: Sun May 21, 2006 8:14 am
Hi guys,
I am having trouble with this count query.
I have never worked with the count beofre and all I get returned is "Array".
Please help.
I am having trouble with this count query.
I have never worked with the count beofre and all I get returned is "Array".
Please help.
Code: Select all
<?php session_start();
$coursetitle = $_GET['coursetitle'];
$username = $_SESSION['username'];
include_once("includes/connect.php");
$sql = "SELECT COUNT(*) FROM course_content WHERE coursetitle='$coursetitle'";
$numrecords = mysql_query($sql) or die("Select Failed!");
$counter = mysql_fetch_array($numrecords);
?>
<?php echo $counter?>