This content has been marked as final. Show 2 replies
> Upon registration I have the date and time entered into mysql so I know when
> someone registers. I have two separate fields in my db for a specific reason.
> When I load registration.php in CS4, I get a pop-up box error: "While
> occurred." This is because of the NOW() and CURTIME() script I added to the
> insert record behavior.
> Is this a real problem? If so, I will address it.
Dreamweaver server behaviors aren't designed to handle MySQL functions.
However, the answer to your problem is very simple. Replace the Date and
Time columns in your table with a single column called "registered". Set
the data type of the column to TIMESTAMP, and enter nothing into it.
MySQL will automatically register the date and time the record was
inserted. Use MySQL date and time functions to extract the values you
want from the timestamp.
By the way, you should not use Date or Time as the name for table
columns. They are reserved words. It's also a good idea to avoid using
uppercase in database, table, or column names, particularly if you are
developing on Windows. The Windows version of MySQL converts all names
to lowercase. If you then upload the database to a Linux server, all
your code will break, because Linux servers are case-sensitive.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS4",
"PHP Solutions" & "PHP Object-Oriented Solutions"
OOohhh.. I see. Great advice.
Thanks so much.
I will work on this tonight.