"; $res = mysql_query($sqlstring ,$db) or die("Invalid query:$sqlstring\n" . mysqli_error($pubConn)); while (list($row_no[]) = mysqli_fetch_row($res)); $no_of_rows = mysqli_num_rows($res); mysql_free_result($res); $sqlstring = "SELECT ip FROM OMCR_BSSTABLE WHERE bssid=$bssid"; //echo "$sqlstring
"; $res = mysql_query($sqlstring ,$db) or die("Invalid query:$sqlstring\n" . mysqli_error($pubConn)); list($ip) = mysqli_fetch_row($res); mysql_free_result($res); if ( $no_of_rows <= 0 || ($no_of_rows > 10) ) { // // No available row in OMCR_COMMAND // Send error to MySQL() // header("Location: " . "objects.php?language=$language&bssid=$bssid&objectid=$objectid" . "&tablename=$tablename" . "&status='Command table is full: Wait and send the command again'" ); return; } // // Insert the delete bss commands in OMCR_COMMAND out of 10 available rows // $i=0; do { if ($row_no[$i] != '') { $sqlstring = "REPLACE INTO OMCR_COMMAND VALUES(" . "{$row_no[$i]},-1,'dropbss $bssid $ip',null,255,-1,null,null,null)"; $res = mysql_query($sqlstring ,$db) or die("Invalid query:$sqlstring\n" . mysqli_error($pubConn)); } $i++; } while ($i<10 && mysql_affected_rows() != 2); if ($i<10) echo "BSS deletion is successful"; else echo "BSS deletion is failed"; ?>