I want to count how many rows there are with the values 127 and 555:555 in certain columns. In the table I am using, there are 2 rows with that criteria. I'm having trouble with the IF statement I think. Anyone know what's wrong? I've been trying for 3 hours. What I want it to do is tell me if there is a row or now. That's all.
<?php
$query = mysql_query("SELECT COUNT(*) FROM $table WHERE $column3 = '127' AND $column5 = '555:555'"); // Selects 2 rows from the database table. $numRows = mysql_num_rows($query); if ($numRows>0) { echo"Row exists!"; } else
{
echo"Row does not exist";
} echo"</br>TEST COMPLETE"; echo"Total Rows: $numRows"; ?>