dongren5293 2012-02-20 17:29
浏览 50
已采纳

在Codeigniter Active Record请求中,哪个函数/类是添加到表名的dbprefix?

In which function/class is the dbprefix added to the table name in Codeigniter Active Record requests?

I need to dynamically change the prefix based on the table name but cannot find the function which prepends the prefix in the first place.

DB_active_rec.php has a dbprefix() function but this appears to have no effect.

  • 写回答

3条回答 默认 最新

  • dongquxiao8545 2012-02-20 17:49
    关注

    It depends on the driver you're using, and it's probably in a few places in that driver too.

    Try the DB_active_rec.php file's set_dbprefix() method to override it. This will get very messy (keeping track of which table you're querying), and I would recommend changing your schema instead.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 孟德尔随机化结果不一致
  • ¥20 求用stm32f103c6t6在lcd1206上显示Door is open和password:
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法