- Joomla! 1.5 Cookbook
- Tom Canavan
- 422字
- 2021-04-09 22:58:49
There might be times you wish to remove JUST the data from a table, such as if a spammer inserts names into your mailing database, or you wish to remove all of the data from any table. There are many times this might come in handy.
You will see how to delete a single row of data and delete the entire data set from the table.
In any case, the same warnings apply.
You will need your username and password for accessing your database in your cPanel? and your FileZilla client.
Depending on your hosting you may need your username and password for the database.
You will need a copy of your database. You can use the recipe to EXPORT your data for safety and backup.
- Navigate to your main database menu. You should be here:
Once again we will review the GUI method first, then the command-line method.
- Locate your table of choice - we'll once again use jos_Corn_Syrup as our table. In this example, we WANT to wipe out the data, but not actually remove the table from the database.
- Choose your table as above then scroll down to the bottom of the screen till you see this screen (opened for the screenshot):
- Choose Empty from the above list. This will prompt you and ask if you are SURE you wish to. Choose Yes in the lower left-corner of the screen to EMPTY (also known as TRUNCATE) the table.
Once done you will see:
This shows that the table was 'emptied' out.
Command line version of Empty (known as Truncate)
- Go back to the top of your phpMyAdmin screen and select the SQL button and enter this command (with the table you want):
TRUNCATE `jos_Corn_Syrup`;
This will ask you to verify it, and if it's correct, click YES in the lower right-hand corner.
This command instructs the database to REMOVE the contents by erasing the data.
In reality the "truncate" command that is called 'drops' the entire table and recreates it but without data.
However, it will maintain the structure of the database. This is useful in situations where you are developing a site and want to remove the content before you turn it over to a client, or in situations where the data is not needed but the table setup by the extension is.
http://www.packtpub.com/ offers a title for a more extensive training on phpMyAdmin - http://www.packtpub.com/phpmyadmin-3rd-edition/book
- Entity Framework Tutorial
- Adobe Illustrator 2023基礎教材
- 穿越Photoshop CC
- 數字孿生體:第四次工業革命的通用目的技術
- Creo 6.0快速入門、進階與精通(升級版)
- 從零開始:AutoCAD 2010中文版建筑制圖基礎培訓教程(第2版)
- 中文版Photoshop 2022基礎教程
- 正則表達式必知必會(修訂版)
- 3D打印輕松實踐:從材料應用到三維建模
- 動畫制作基礎(項目教學版)
- 3ds max 2018中文版基礎與實例教程(第6版)
- Axure RP8原型設計圖解視頻教程(Web+App)
- 中文版3dsmax2020/VRay效果圖全能教程
- Photoshop CC 2015課堂實錄
- SEO搜索引擎優化:基礎、案例與實戰(第2版)