mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	git-svn-id: http://www.observium.org/svn/observer/trunk@1223 61d68cd4-352d-0410-923a-c4978735b2b8
		
			
				
	
	
		
			20 lines
		
	
	
		
			526 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			526 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
| <?php
 | |
| 
 | |
| mysql_query("ALTER TABLE `eventlog` DROP `id`");
 | |
| mysql_query("ALTER TABLE `eventlog` ADD  `event_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY  FIRST");
 | |
| 
 | |
| $s = "SELECT * FROM eventlog";
 | |
| $q = mysql_query($s);
 | |
| while ($event = mysql_fetch_array($q)) {
 | |
| 
 | |
|   if($event['interface']) {
 | |
|     mysql_query("UPDATE `eventlog` SET `interface` = NULL, `type` = 'interface', `reference` = '".$event['interface']."' WHERE `event_id` = '".$event['event_id']."'");
 | |
|   }
 | |
|   $i++;
 | |
| }
 | |
| 
 | |
| mysql_query("ALTER TABLE `eventlog` DROP `interface`");
 | |
| 
 | |
| ?>
 | |
| 
 |