Liz*_*ard 1 php mysql conventions naming-conventions hungarian-notation
我一般总是Hungarian Notation在我的表中使用某种字段名称,例如
#Table Users
u_id, u_name, u_email etc...
#Posts
p_id, p_u_id, p_title, p_content etc...
Run Code Online (Sandbox Code Playgroud)
但我最近被告知这不是最佳做法.有更标准的方法吗?我真的不喜欢只使用该字段,id因为这需要您选择table.field对于使用连接等时出现在多个表中的字段名称
您对什么是最佳实践的想法将不胜感激.