MODX3 How to get the db table prefix?


how can I get the database table prefix?
I dont find anything…

thank you in advance.


Hey @fritzkola

You should be able to find your table prefix in:

Manage / Reports / System Info:


Thank you very much.

I have to be more specific.

I need the prefix value in snippet.

1 Like

There may be more elegant ways to do this but I think this should work:

include 'core/config/';
echo $table_prefix;

Someone more knowledgeable than me might be able to comment on the security of this method.

thank you.
ok, this is a solution.

I tried some, but I remember there should be indeed a more elegant way.


1 Like

yes, thats it.

thank you so much. :pray: :pray:

1 Like