i made this code but it shows result
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Program Files\VertrigoServ\www\sanjay\rlc\closing.php on line 14



$today=date("Y-m-d H:i:s",strtotime("+5 hours, +30 minutes")); 
$c_closing="select * from member_information where child >=2";

while ($c_row=mysql_fetch_array($c_closing_query)) {
     	$c1_query="select * from member_information where Mem_sponsor_id=".$c_row['Id']." limit 0,1";
		$c2_query="select * from member_information where Mem_sponsor_id=".$c_row['Id']." limit 1,2";
		if($pair1>$pair2) {
			echo $pair=$pair2;
		if($pair1<$pair2) {
			echo $pair=$pair1;
		if($pair1==$pair2) {
			echo $pair=$pair2;
		$b_query="insert into binary_income(reg_id,date,pair,binary_income) values (".$c_row['Id'].",'$today','$pair'.'$binary_income')"; 
		$b_update="update member_information set child=0 where Id=".$c_row['Id']."";
} ?>

please tell me where is the error


$c_closing_query=mysql_query($c_closing) or die(mysql_error());

Looks like your query returns an error. This will display it (assuming the connection to mysql succeeded).

can u give the table structure member_information or can u be sure that the column Mem_sponsor_id is present in the member_information table?

go with pritaeas suggestion