SQLHelper.php 416 B

123456789101112131415161718192021
  1. <?php
  2. use common\helpers\DbDriverHelper;
  3. /**
  4. * Author: lf
  5. * Blog: https://blog.feehi.com
  6. * Email: job@feehi.com
  7. * Created at: 2020-08-04 17:27
  8. */
  9. class SQLHelper
  10. {
  11. public static function getRealSQL($sql, $options)
  12. {
  13. if( isset($options['table']) ) {
  14. $sql = str_replace(["###TABLE_NAME###"], [DbDriverHelper::getTableName("{{%user}}")], $sql);
  15. }
  16. return $sql;
  17. }
  18. }