2

Any short code to get the database table prefix in cakephp controller action ?

Please advise me .Thanks in advance

2
  • what exactly are you trying to achieve? Database table prefix is defined in /app/Core/database.php, is this what you want? Commented Mar 29, 2012 at 10:40
  • No I wanna just print the table prefix in controller action for some reason Commented Mar 29, 2012 at 10:46

1 Answer 1

5

well:

$prefix = $this->ModelName->tablePrefix;
Sign up to request clarification or add additional context in comments.

1 Comment

it is also documented: book.cakephp.org/2.0/en/models/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.