---
title: 'Database Table Prefixes'
url: 'https://manuals.remository.com/plotalot/sql-for-plotalot/database-table-prefixes'
markdown: 'https://manuals.remository.com/plotalot/sql-for-plotalot/database-table-prefixes.md'
date: '2026-10-06'
description: 'Joomla database table names begin with a prefix, which is chosen at site installation time and stored in the configuration.php file, as a first line of defence against SQL attacks. In Plotalot queries, you can use the table names as they actually exist in the database with the configured site prefi…'
taxonomy:
  category:
    - docs
---

[](#) [ edit this page](https://github.com/getgrav/grav-skeleton-rtfm-site/blob/develop/pages/05.sql-for-plotalot/01.database-table-prefixes/docs.md) 

  [ Plotalot for Joomla ](https://manuals.remository.com/plotalot/)     [ SQL for Plotalot ](https://manuals.remository.com/plotalot/sql-for-plotalot)      Database Table Prefixes    

# Database Table Prefixes

Joomla database table names begin with a prefix, which is chosen at site installation time and stored in the configuration.php file, as a first line of defence against SQL attacks. In Plotalot queries, you can use the table names as they actually exist in the database with the configured site prefix, but to make your charts more portable it's better to use the universal prefix "#\_\_"

```
SELECT `title`, `hits` FROM `#__content` ORDER BY `hits` DESC LIMIT 10
```

The "#\_\_" is dynamically replaced with the site prefix, so if the site prefix is "cdxz\_", this query resolves to:

```
SELECT `title`, `hits` FROM `cdxz_content` ORDER BY `hits` DESC LIMIT 10
```

 [ ](https://manuals.remository.com/plotalot/sql-for-plotalot) [](https://manuals.remository.com/plotalot/sql-for-plotalot/multiple-columns-with-the-same-name)

---

## Navigation

- Parent: [SQL for Plotalot](https://manuals.remository.com/plotalot/sql-for-plotalot.md)
- Next: [Multiple Columns with the Same Name](https://manuals.remository.com/plotalot/sql-for-plotalot/multiple-columns-with-the-same-name.md)
