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? Mar 29, 2012 at 10:40
  • No I wanna just print the table prefix in controller action for some reason
    – Duke
    Mar 29, 2012 at 10:46

1 Answer 1

5

well:

$prefix = $this->ModelName->tablePrefix;
1

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.