0 OR destination <> \"\") then insert into ncdr (`VendorID`, `name` ,`destination`, `ip`, `duration`,`errortype`,`Called-Party`,`DATE`,`EndPoint`) values( id, vname, destination, NEW.NASIPAddress, NEW.SessionTime, NEW.DisconnectErrorType, NEW.CalledStationId, NEW.CreationDate, temp ); ELSE insert into unknown (`VendorID`, `name` ,`destination`, `ip`, `duration`,`errortype`,`Called-Party`,`DATE`,`EndPoint`) values( id, vname, destination, NEW.NASIPAddress, NEW.SessionTime, NEW.DisconnectErrorType, NEW.CalledStationId, NEW.CreationDate, temp ); END IF; END "; echo $trigger; $db->multi_query($trigger); ?>