Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

for what purpose # (hash) sign is used in Joomla?

Tags:

joomla

In joomla MVC i came around this SQL query. I was unable to understand the purpose of #sign ??

INSERT INTO `#__helloworld` (`greeting`) VALUES
    ('Hello World!'),
    ('Good bye World!');
like image 820
arslan Avatar asked Nov 18 '25 16:11

arslan


1 Answers

It is replaced by the prefix for that installation when it is run. This way you can have multiple Joomla installations running in the same database, as long as they all have different prefixes. You can find the prefix for your installation in the Global Settings as well as in the configuration.php file.

The entire #__ part is necessary for the replace to work properly. So just a # will not work as intended.

*Note that this is a Joomla specific construct, so don't expect this to work with just PHP/MySQL. It will work for all Joomla versions and is highly recommended.

like image 115
David Fritsch Avatar answered Nov 20 '25 13:11

David Fritsch