NYCPHP Meetup

NYPHP.org

[nycphp-talk] db design/ app logic: making certain rows immutable

Rukbat rukbat at webdingers.com
Sat Jul 23 21:30:33 EDT 2011


On 7/15/2011 11:30 AM, David Mintz wrote:
> I hesitate to bore you with my details, but -- you can stop reading if 
> it gets too boring.
<snippety>
> So, should my JS code examine the currently selected event_type option 
> to see if it matches the string "probation interview?"

Have you thought about giving event_type a few different edit levels (in 
a single field - edit_level).  That way you can edit anything (your 
level would be 1 higher than the highest level in the table).  Each 
event has a level the user has to be in order to be able to edit it.  
Default level is the level of the user creating it.  Some users would 
have higher levels, since they understand the data (or can make your 
life miserable).

If I understand the problem, that should work.  If it won't work, I 
don't understand the problem.  Which wouldn't be unusual - it's about 90 
degrees, the end of a long day of debugging and "hello" is a major 
undertaking right now.  But I run into this sort of thing a few times a 
day (I write a lot of web pages), and I usually just brute-force it.  
Elegant is nice, but sometimes it just has to work, and it has to work 
now.  Once it's working and out there, you can play with it on a local 
server and code it so that the flow chart looks nice.



More information about the talk mailing list