All pastes #766585 Raw Edit

Mine

public php v1 · immutable
·published 2007-11-08 23:48 UTC
rendered paste body
		//-----------------------------------------		// Add db index tables		//-----------------------------------------				$this->ipsclass->DB->query("DESCRIBE " . SQL_PREFIX . "attachments");		$sql = $this->ipsclass->DB->simple_exec();		$results = $this->ipsclass->DB->fetch_rowset( $sql );			foreach ($resuls as $data)		{			if ( $data['Field'] == 'attach_file' AND $data['Key'] != 'MUL' )			{				$this->ipsclass->DB->query("ALTER TABLE " . SQL_PREFIX . "attachments ADD INDEX ( attach_file )");			}						if ( $data['Field'] == 'torrent_id' AND $data['Key'] != 'MUL' )			{				$this->ipsclass->DB->query("ALTER TABLE " . SQL_PREFIX . "attachments ADD INDEX ( torrent_id )");			}		}