Click to See Complete Forum and Search --> : Some follow-up info
Edvard's instructions were dead on, but I thought I would add some things I stumbled over getting htaccess to work in win2k:
1) Path names. Apache likes to install with it's own htdocs dir that it defaults to. Be careful of the pathname you enter into htaccess - spaces kill it. I found it was easier to point Apache at a one word named folder (Edvard's C:/www was perfect) and update httpd.conf with the new folder.
2) Encyrption. For some strange reason this was misbehaving for me. I recommend until you've got htaccess up and running that you use not ask passwords be encrypted. It's just easier to test on the fly this way.
Good luck restricting access!
-Doug
I need to store a variable into a colum that needs to be a dataabase date value; so when I query the table I can ORDER BY date ASC or DESC
I am having trouble inserting data into the timestamp colum this is the format that I want to store into the colum
10-01-2002 (day-month-year)
I get an error when I try to insert this format, I have no idea how to do this with MSSQL SERVER Please help
Thanks
/////////////////My table//////////////////
doc_number varchar(15)
reason text(16)
purpose text(16)
author varchar (60)
date_created timestamp(8)
this is the variable that I created to insert into the colum date_created
$date=date("d-m-Y");
I think I need to set this variable on the database side I am not sure.
MSSQL SERVER 2000, php 4.04
gardner1
02-16-2002, 03:40 AM
dont know if this helps or not but it seems a problem of trying to jam a square peg in a round hole =)
from http://www.mysql.com/doc/D/A/DATETIME.html
*********************************
6.2.2.2 The DATETIME, DATE, and TIMESTAMP Types
The DATETIME, DATE, and TIMESTAMP types are related. This section describes their characteristics, how they are similar, and how they differ.
The DATETIME type is used when you need values that contain both date and time information. MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD HH:MM:SS' format. The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'. (``Supported'' means that although earlier values might work, there is no guarantee that they will.)
The DATE type is used when you need only a date value, without a time part. MySQL retrieves and displays DATE values in 'YYYY-MM-DD' format. The supported range is '1000-01-01' to '9999-12-31'.
The TIMESTAMP column type provides a type that you can use to automatically mark INSERT or UPDATE operations with the current date and time. If you have multiple TIMESTAMP columns, only the first one is updated automatically.
Automatic updating of the first TIMESTAMP column occurs under any of the following conditions:
The column is not specified explicitly in an INSERT or LOAD DATA INFILE statement.
The column is not specified explicitly in an UPDATE statement and some other column changes value. (Note that an UPDATE that sets a column to the value it already has will not cause the TIMESTAMP column to be updated, because if you set a column to its current value, MySQL ignores the update for efficiency.)
You explicitly set the TIMESTAMP column to NULL.
*********************************
gardner1
02-16-2002, 03:44 AM
so just change:
date_created timestamp(8)
TO
date_created DATE(10)
<-- 10 just in case they count the - as a character , dunno if they do /shrug
Then you date format will be "Euro" style
YYYY-MM-DD but you can parse that back out to the format you like once you have retrieved it back out.
Richard Gardner wrote:
-------------------------------
dont know if this helps or not but it seems a problem of trying to jam a square peg in a round hole =)
from http://www.mysql.com/doc/D/A/DATETIME.html
*********************************
6.2.2.2 The DATETIME, DATE, and TIMESTAMP Types
The DATETIME, DATE, and TIMESTAMP types are related. This section describes their characteristics, how they are similar, and how they differ.
The DATETIME type is used when you need values that contain both date and time information. MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD HH:MM:SS' format. The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'. (``Supported'' means that although earlier values might work, there is no guarantee that they will.)
The DATE type is used when you need only a date value, without a time part. MySQL retrieves and displays DATE values in 'YYYY-MM-DD' format. The supported range is '1000-01-01' to '9999-12-31'.
The TIMESTAMP column type provides a type that you can use to aut....
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.