Welcome Guest, Not a member yet? Register   Sign In
Active Record insert without fields and values
#2

[eluser]Narkboy[/eluser]
Feels like a feature to me. Basically, part of Active Record is to reduce the potential for errors going into the database. If you intend to put an 'blank' record in, then it makes you code a specific blank. If you don't want blank records, this behavious means you see an error.

That said, it would seem that you can still get no error if you try to enter a record but for whatever reason the data does not get there.

Perhaps the best way would be to code a specific Active Record function - insert_blank() for this purpose. I can't see a reason for having a table with an id and timestamp though. Even for an access log, surely you want more information than that? I'm sure you have your reasons!

/B


Messages In This Thread
Active Record insert without fields and values - by El Forum - 06-15-2011, 01:07 AM
Active Record insert without fields and values - by El Forum - 06-16-2011, 07:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB