We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问下EvaEngine有分表的功能吗?比如根据ID范围来分表:
function getTable( $uid ){ $ext = substr ( md5($uid) ,0 ,2 ); return "user_".$ext; }
EvaEngine有这种功能吗?
The text was updated successfully, but these errors were encountered:
可以自己实现一个BaseModel继承Eva\EvaEngine\Mvc\Model然后覆盖getSource方法
Eva\EvaEngine\Mvc\Model
getSource
Sorry, something went wrong.
AlloVince类似下面这样吗?
class Users extends Eva\EvaEngine\Mvc\Model { public function getSource () { $ext = substr(md5($uid), 0, 2);//通过UID来拼接用户表 $this->setSource('users_' . $ext); } }
问题没搞清楚 uid 是在什么时候传到 getSource() 方法里?还请劳驾讲一下,先谢谢啦!
uid
getSource()
可以参考这个实现 http://stackoverflow.com/questions/22215688/how-to-connect-multiple-database-in-phalcon-framework-at-the-same-time-use-both
No branches or pull requests
问下EvaEngine有分表的功能吗?比如根据ID范围来分表:
EvaEngine有这种功能吗?
The text was updated successfully, but these errors were encountered: