Hello I need to do search through a mysql db on a column and search
how many values are equal to a number and than post the number
of the values that are equal to this. I would like the number
of the values to be saved into a php integer and not in db column

Hello I need to do search through a mysql db on a column and search
how many values are equal to a number and than post the number
of the values that are equal to this. I would like the number
of the values to be saved into a php integer and not in db column

<?
$s="select id from tablename where number_field=$num";
$rs = mysql_query($s);
$num = mysql_num_rows($rs);
print $num;
?>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.