$interface_descr($if_id)) \n"); if(mysql_result(mysql_query("SELECT count(*) FROM pseudowires WHERE `interface_id` = '$if_id' AND `cpwVcID`='".$cpwVcID."'"),0)) { echo("already have! \n"); } else { $insert_query = "INSERT INTO `pseudowires` (`interface_id`,`peer_device_id`,`peer_ldp_id`,`cpwVcID`,`cpwOid`) "; $insert_query .= "VALUES ('$if_id','$cpw_remote_device','$cpw_remote_id','$cpwVcID', '$cpwOid')"; mysql_query($insert_query); } } } } } ?>