我們的一個(gè)客戶就有更新他的網(wǎng)站的問(wèn)題。問(wèn)題是“更新”表在數(shù)據(jù)庫(kù)中已成為損壞。
我們?yōu)樗业搅艘粋€(gè)解決辦法,但它需要運(yùn)行一個(gè)查詢?cè)趐hpMyAdmin。他不熟悉的過(guò)程運(yùn)行數(shù)據(jù)庫(kù)查詢之前,所以我們創(chuàng)建了本教程。
在一步一步的教程中,我們將描述問(wèn)題,演示如何解決它。
問(wèn)題
- 將組件- > Joomla更新導(dǎo)致這個(gè)錯(cuò)誤:

An error has occurred.
1146 Table `updates` doesn't exist SQL=SELECT DISTINCT update_site_id FROM #__updates WHERE `update_site_id` IN ( SELECT update_site_id FROM #__update_sites WHERE `last_check_timestamp` IS NULL OR `last_check_timestamp` <= '1493997061')
- 要擴(kuò)展- >管理- >數(shù)據(jù)庫(kù)導(dǎo)致這個(gè)錯(cuò)誤:
Table 'updates' does not have column 'infourl'. (From file 2.5.0-2012-01-10.sql.)
Table 'updates' should not have column 'categoryid'. (From file 3.0.0.sql.)
Table 'updates' does not have column 'extra_query'. (From file 3.2.2-2013-12-22.sql.)
Table 'updates' does not have column 'version' with type varchar(32). (From file 3.2.2-2014-01-18.sql.)
- 使用修復(fù)按鈕不修復(fù)它。相反,它導(dǎo)致這個(gè)錯(cuò)誤:

Error
Table 'updates' doesn't exist SQL=SHOW COLUMNS IN `#__updates` WHERE field = 'infourl'
Table 'updates' doesn't exist SQL=SHOW COLUMNS IN `#__updates` WHERE Field = 'categoryid'
Table 'updates' doesn't exist SQL=SHOW COLUMNS IN `#__updates` WHERE field = 'extra_query'
Table 'updates' doesn't exist SQL=SHOW COLUMNS IN `#__updates` WHERE field = 'version' AND type = 'varchar(32)'
解決方案
在這一點(diǎn)上,我們需要一個(gè)數(shù)據(jù)庫(kù)解決方案。
- 使用您的主機(jī)的控制面板來(lái)訪問(wèn)phpMyAdmin:
- 點(diǎn)擊數(shù)據(jù)庫(kù)和訪問(wèn)數(shù)據(jù)庫(kù):
- 轉(zhuǎn)到SQL選項(xiàng)卡,并添加以下查詢:
DROP table IF EXISTS jos_updates;
CREATE TABLE `jos_updates` (
`update_id` int(11) NOT NULL AUTO_INCREMENT,
`update_site_id` int(11) DEFAULT '0',
`extension_id` int(11) DEFAULT '0',
`name` varchar(100) DEFAULT '',
`description` text NOT NULL,
`element` varchar(100) DEFAULT '',
`type` varchar(20) DEFAULT '',
`folder` varchar(20) DEFAULT '',
`client_id` tinyint(3) DEFAULT '0',
`version` varchar(32) DEFAULT '',
`data` text NOT NULL,
`detailsurl` text NOT NULL,
`infourl` text NOT NULL,
`extra_query` VARCHAR(1000) DEFAULT '',
PRIMARY KEY (`update_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Available Updates';
- 在上面的查詢中,“jos”替換為您的表前綴(不含下劃線)
- 如果你不確定你的數(shù)據(jù)庫(kù)表前綴是什么,你可以找到它在全局配置的服務(wù)器選項(xiàng)卡。
- 點(diǎn)擊后,您應(yīng)該看到一條成功消息類似如下:






