[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SQL inserts



> I read in the MySQL manual that it supports the set syntax.  Anyway, I
> think that's the best way to do it, because it's easier to read and if
> we change the order of columns in the table, or add or delete something,
> it will be MUCH easier to fix things.

OK... if it does, cool, lemme check up on the docs for mysql and get back to ya
shortly... I ran that command from the muysql prompt and it died "near set ..." so
I quickly thought "mysql must not support insert set's"... as many DB's don't.  But
I'll hit the docs, formulate a set insert statment similar and get back to ya...
cuz if it works, your right, that is the way we should be doing it.

On another note though... when inserting a new user these should be a few defaults:

NumLogins - 0 (NOT NULL)
ModTime - NULL

Actually - ANYTIME you ever code a update, or insert statment - ModTime should
ALWAYS be set to NULL, as I said before, this prompts MySQL to properly timestamp
the record.

Be back to ya soon :)

Jason