RE: [PHP-DB] DATETIME

2009-10-08 Thread Edward Brookhouse
anularity should not be an issue. Thanks all Edward -Original Message- From: Jason Gerfen [mailto:jason.ger...@scl.utah.edu] Sent: Thursday, October 08, 2009 4:09 PM Cc: php-db@lists.php.net Subject: Re: [PHP-DB] DATETIME Go look at dev.mysql.com and search for DATETIME. There are plent

Re: [PHP-DB] DATETIME

2009-10-08 Thread Jason Gerfen
Sorry I should have included a simple example: SELECT (`field_01`, `field_02`) FROM `table` WHERE DATETIME('2009-09-01 00:00:00.000') < DATETIME('2009-10-01 23:59:59.999'); Dan Shirah wrote: Hi All, I have a DB that is storing the date/time an event happens in DATETIME format, i.e. 1254252

Re: [PHP-DB] DATETIME

2009-10-08 Thread Jason Gerfen
Go look at dev.mysql.com and search for DATETIME. There are plenty of examples of how to do comparison searching using the UNIX datestamps. Dan Shirah wrote: Hi All, I have a DB that is storing the date/time an event happens in DATETIME format, i.e. 1254252889, which translates to Tue, 29 Se

Re: [PHP-DB] DATETIME

2009-10-08 Thread Dan Shirah
> > Hi All, > > > > I have a DB that is storing the date/time an event happens in DATETIME > format, i.e. 1254252889, which translates to Tue, 29 Sep 2009 19:34:49 UTC > > > > I am trying to write a query in PHP that will look for any row that falls > within a range of dates, i.e. between Sep 1 and

[PHP-DB] DATETIME

2009-10-08 Thread Edward Brookhouse
Hi All, I have a DB that is storing the date/time an event happens in DATETIME format, i.e. 1254252889, which translates to Tue, 29 Sep 2009 19:34:49 UTC I am trying to write a query in PHP that will look for any row that falls within a range of dates, i.e. between Sep 1 and Oct 1, but ther

Re: [PHP-DB] DATETIME MySQL - using only month and date

2005-04-10 Thread Andrés G . Montañez
> $month_start : starting month > $month_end : ending month > > $day_start : starting day > $day_end : ending day You could add something like this in the WHERE clause: ((MONTH(closing) >= $month_start AND DAY(closing) >= $day_start) AND (MONTH(closing) <= $month_end AND DAY(closing) <= $day_end

[PHP-DB] DATETIME MySQL - using only month and date

2005-04-10 Thread [EMAIL PROTECTED]
Good day to all of you --- I have a recond in my Database that is called closing and it is a DATETIME ( -MM-DD HH:MM:SS ) I would like to be able to SELECT from the DB a range of information e.x. FROM 15/02 to 17/03 Can you please tell me how the SQL query should be constructed it if we supp

[PHP-DB] datetime update

2004-06-10 Thread Gawie Marais
Hi all, i have a datetime field in a mysql database and it's defined with a default of '-00-00 00:00:00:' now, when i add a record to the database, i want to fill that field with the date and current time. can anyone point me ? Thanx, Gawie. -- PHP Database Mailing List (http://www.php.

[PHP-DB] DATETIME Query

2003-10-07 Thread Shaun
Hi, I have a table called Bookings which has two important columns; Booking_Start_Date and Booking_End_Date. These columns are both of type DATETIME. The following query calculates how many hours are available between the hours of 09.00 and 17.30 so a user can see at a glance how many hours they h

RE: [PHP-DB] DATETIME Field Query

2003-09-23 Thread Jacob A. van Zanen
If I'm not mistaken you should use the dateformat function (of the top of my head) Jack -Original Message- From: Shaun [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 1:54 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] DATETIME Field Query Hi, I had a DATE field

[PHP-DB] DATETIME Field Query

2003-09-23 Thread Shaun
Hi, I had a DATE field in my table which I have now changed to DATETIME. When querying this field, how can I retrieve say the date part, or the minutes part for example from the table? At the moment I am just retrieving the whole field... Thanks for your help -- PHP Database Mailing List (http:

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-06 Thread John W. Holmes
> I am now getting a completely different error that I cannot figure > out how it is related. I have passed the $td variable into the function > and > then get it back as a POST variable from a hidden field within the > function. > Here is the error I am now seeing; > > Unknown column 'sn42

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-06 Thread NIPP, SCOTT V (SBCSI)
enerating this error. I am guessing that you guys will need more info to help out with this now. Just let me know what you want. Thanks again. -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 10:07 AM To: NIPP, SCOTT V (SBCSI) Subject: R

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-06 Thread NIPP, SCOTT V (SBCSI)
] Sent: Thursday, June 05, 2003 9:48 AM To: NIPP, SCOTT V (SBCSI) Subject: RE: [PHP-DB] Datetime help in an INSERT... a button is being pressed? so it is processing a form? if its in a form just pass along the value of $td via hidden input data... jay merritt [EMAIL PROTECTED] [EMAIL PROTECTED

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-06 Thread NIPP, SCOTT V (SBCSI)
lto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 9:01 AM To: NIPP, SCOTT V (SBCSI) Subject: RE: [PHP-DB] Datetime help in an INSERT... You could alway place it as a "GET" echo ""; Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forw

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-06 Thread NIPP, SCOTT V (SBCSI)
ROTECTED] Sent: Thursday, June 05, 2003 9:06 AM To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Datetime help in an INSERT... > I have actually discovered that the $td value is blank. The reason > appears to be that the page is reloading when a butt

Re: [PHP-DB] Datetime help in an INSERT...

2003-06-06 Thread CPT John W. Holmes
> I have actually discovered that the $td value is blank. The reason > appears to be that the page is reloading when a button is pushed, and that > is when the $td value is being lost. My question now is, how do I keep the > $td value after the page is reloaded? I would rather keep the value fro

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-06 Thread NIPP, SCOTT V (SBCSI)
PROTECTED] Subject: Re: [PHP-DB] Datetime help in an INSERT... > > I am stumbling across something that I thought I have done before, > > and I am not having any luck finding an example of this. Basically, I am > > wanting to timestamp the date and time into new entries in a

Re: [PHP-DB] Datetime help in an INSERT...

2003-06-05 Thread CPT John W. Holmes
> 2. Place single quotes within your VALUES parens, e.g. If they are really strings. Integers or dates in a MMDD format do not require quotes. > $denylog = "INSERT INTO deny (account, td, datefield ) VALUES ('$tmp', > '$td', NOW() )" ---John Holmes... -- PHP Database Mailing List (http://

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-05 Thread NIPP, SCOTT V (SBCSI)
far. -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 2:14 PM To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Datetime help in an INSERT... > > I am stumbling across something that I thought

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-05 Thread Gary . Every
m Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message- > From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 04, 2003 2:06 PM > To: 'Rankin, Randy'; '[E

Re: [PHP-DB] Datetime help in an INSERT...

2003-06-05 Thread CPT John W. Holmes
> > I am stumbling across something that I thought I have done before, > > and I am not having any luck finding an example of this. Basically, I am > > wanting to timestamp the date and time into new entries in a simple > database > > table. The following section is the actual code for this, and

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-05 Thread NIPP, SCOTT V (SBCSI)
No, the field is a Datetime field rather than a Timestamp field. -Original Message- From: Rankin, Randy [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 1:59 PM To: '[EMAIL PROTECTED]' Subject: RE: [PHP-DB] Datetime help in an INSERT... Correction ( I typed

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-05 Thread Rankin, Randy
ALUES ($tmp, $td )"; Randy -Original Message- From: Rankin, Randy [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 1:56 PM To: '[EMAIL PROTECTED]' Subject: RE: [PHP-DB] Datetime help in an INSERT... If you are using MySql with the date field is of type timestamp, you s

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-05 Thread Rankin, Randy
al Message- From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 1:47 PM To: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Subject: RE: [PHP-DB] Datetime help in an INSERT... The error I am receiving is: You have an error in your SQL s

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-05 Thread NIPP, SCOTT V (SBCSI)
The error I am receiving is: You have an error in your SQL syntax near ' NOW())' at line 1 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 1:45 PM To: NIPP, SCOTT V (SBCSI) Subject: Re: [PHP-DB] Datetime help in

[PHP-DB] Datetime help in an INSERT...

2003-06-05 Thread NIPP, SCOTT V (SBCSI)
I am stumbling across something that I thought I have done before, and I am not having any luck finding an example of this. Basically, I am wanting to timestamp the date and time into new entries in a simple database table. The following section is the actual code for this, and I cannot f

RE: [PHP-DB] datetime

2003-01-22 Thread John W. Holmes
> hello and thank you... probably again. > using datetime, &/or something else if applicable, is it possible to > have entries to a page and entries to a db automatically delete? i > have looked through many docs at php.net and mysql and can't find > anything. perhaps i'm using the wrong search key

[PHP-DB] datetime

2003-01-21 Thread Addison Ellis
hello and thank you... probably again. using datetime, &/or something else if applicable, is it possible to have entries to a page and entries to a db automatically delete? i have looked through many docs at php.net and mysql and can't find anything. perhaps i'm using the wrong search key words.

[PHP-DB] Datetime field comparison incorrect

2002-07-06 Thread Casey Allen Shobe
Hi, I'm querying 2 datetime fields from a MSSQL database. The format returned is 'Jul 06 2002 01:57PM' or similar. I then try to do a comparison in PHP, to see if one is greater than the other. The problem is that PHP believes 'Jul 06 2002 12:43PM' is greater than 'Jul 06 2002 01:08PM', which

Re: [PHP-DB] datetime insert using now()

2001-12-11 Thread bill
Aha. That seems to work. thanks, bill Charles Lahlou wrote: > >INSERT INTO thisdb (event) VALUES ((now() + 3600); > > try rather VALUES (now() + INTERVAL 3600 SECOND) > > charles lahlou > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For

RE: [PHP-DB] datetime insert using now()

2001-12-11 Thread Charles Lahlou
here to get SQL language comparison charts on their compatibility? Charles Lahlou -Message d'origine- De : bill [mailto:[EMAIL PROTECTED]] Envoye : mardi 11 decembre 2001 16:48 A : [EMAIL PROTECTED] Objet : [PHP-DB] datetime insert using now() I'm trying to insert informatio

RE: [PHP-DB] datetime insert using now()

2001-12-11 Thread Charles Lahlou
>INSERT INTO thisdb (event) VALUES ((now() + 3600); try rather VALUES (now() + INTERVAL 3600 SECOND) charles lahlou -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrat

Re: [PHP-DB] datetime insert using now()

2001-12-11 Thread Dobromir Velev
ssage- From: bill <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Tuesday, December 11, 2001 18:08 Subject: [PHP-DB] datetime insert using now() >I'm trying to insert information into a datetime field in a MySQL >database with the following: > >

[PHP-DB] datetime insert using now()

2001-12-11 Thread bill
I'm trying to insert information into a datetime field in a MySQL database with the following: INSERT INTO thisdb (event) VALUES ((now() + 3600); But it only works sometimes. Why sometimes? What would be a better way of doing it? -- PHP Database Mailing List (http://www.php.net/) To unsub

Re: [PHP-DB] datetime in MSSQL7

2001-10-23 Thread Frank M. Kromann
This problem has just been fixed in CVS. - Frank > Hello! > > How can I force PHP to fetch datetime field i 'mmdd hh:mm:ss' WITHOUT > using MSSQL query like *SELECT convert(varchar,dtfield,20) as 'dtfield'* and > so on? > I have a few tables on MSSQL with the different structures and som

[PHP-DB] datetime in MSSQL7

2001-10-22 Thread kras
Hello! How can I force PHP to fetch datetime field i 'mmdd hh:mm:ss' WITHOUT using MSSQL query like *SELECT convert(varchar,dtfield,20) as 'dtfield'* and so on? I have a few tables on MSSQL with the different structures and some of fields are datetime. I have to use CLASS in php with querys