I am trying to find the number of rows in a SQL query and my echo is returning “Array1” or “Array2” , etc. Its not actually giving me a number value. I thought that before it would actually give me a number.
EDIT: Jumped the gun. Apparently I had another echo that was returning the “Array” message. The count was just hidden from me. This thread can be deleted. (I would do it, but I dont see an option to delete the thread)
$S= mysql_query ("SELECT CA FROM ca WHERE CA='".$CA2."' AND Resporg='".$Resp."'");
echo "SELECT CA FROM ca WHERE CA='".$CA2."' AND Resporg='".$Resp."'"."<BR>";
$sqlcount= mysql_num_rows ($S);
echo $sqlcount."<BR>"; //How many records does my SQL have?
I’m trying to pass the number of rows from the $sqlcount into a loop. I believe it’s not making it into that loop because it doesn’t know what this value is.