RE: [PHP-DB] Trouble retrieving DATETIME info from MSSQL - resolved

2001-10-02 Thread Matthew DeChant
Dates in MSSQL are stored as: mon dd hh:miAM (or PM) and ODBC converts them to: -mm-dd hh:mi:ss.mmm(24h) so: select * from Internetlog where convert(varchar, LogTime, 121) like '%2001-10-02%' -Original Message----- From: Matthew DeChant [mailto:[EMAIL PROTECTED]] Se

[PHP-DB] Trouble retrieving DATETIME info from MSSQL

2001-10-01 Thread Matthew DeChant
Hello, I am having trouble getting data from a DATETIME field in MSSQL 7.0. The data in a general select query look like this: 2001-09-25 14:23:17.000 I can do this in MSSQL: select * from INTERNETLOG where Datetime like %2001% but not this: select * from INTERNETLOG where Datetime like %2

RE: [PHP-DB] MSSQL Identity Column

2001-04-13 Thread Matthew DeChant
I don't have the full answer off hand, but I do remember that if you do: sp_columns your_table_name One of the columns of that result is a numeric value that indicates whether the column is a primary key. I think I had to create a test table with a primary key to figure out what the column and n