[PHP-DB] Date

2002-05-22 Thread John Fishworld
Can someone help me with the correct sytax here ! I'm trying to show results from the last two days(or week etc) This is what I've got SELECT . WHERE. AND ( (DATE_SUB(j.stellen.t_stellen_date INTERVAL 2 day) < j.stellen.t_stellen_date) but it doesn't work ! What's wrong ? The t_stelle

[PHP-DB] date()

2002-11-13 Thread Edward Peloke
I have a date field in my mysql db, when I output the data to the screen, I don't want to see the minutes, just the mmddyy. I can format a date but can't seem to get it to work passing in the value from $myrow["datefield"]any ideas? I don't want to have to worry about just pulling what I want

[PHP-DB] DATE

2007-04-06 Thread Ron Piggott
Would someone help me with this --- How do I get the results for 2 days before Easter Sunday from this --- what do I have to do to my date statement to figure out Good Friday? $good_Friday = date("Y-m-d", easter_date($current_year));

[PHP-DB] Date

2001-03-25 Thread [EMAIL PROTECTED]
Hello, I save the date in my MySQL db as 2001-03-25. But in my PHP script i want do see it like 25-03-2001. How do i get this result thx

[PHP-DB] Date

2001-10-04 Thread Devon
Is there a way that the default sql data base date -00-00 can be changed using php? Cheers -- 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 administrators, e-mail: [EMAIL PRO

[PHP-DB] date

2001-10-18 Thread ax
if i unput the values 10/10/2001 into mysql database, would mysql or php recognize that as a date?? i am a bit confused. i inserted few dates in the above format and asked mysql to list them by date and it does not seem to work. any suggestions?? please :) ax -- PHP Database Mailing List

[PHP-DB] date

2001-10-26 Thread ax
how would i enter european format date into mysql (dd/mm/) ... and how would i make the query sort by date if i am using this format ?? ax -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To con

[PHP-DB] Date

2003-02-28 Thread Jorge Miguel Fonseca Martins
How can a make a query that lists all the fields where a datefield as the date of tomorow? thanks

[PHP-DB] Date function

2002-01-28 Thread Sridhar Moparthy
Hi All, Is there any function in PHP4.X or in Oracle8i to calculate number of Business days ( excluding Saturday and Sunday) between two given dates? Thanks in advance. Sridhar. -Original Message- From: qartis [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 1:38 PM To: [EMAIL

[PHP-DB] Date operations.

2002-01-28 Thread Garry Optland
Hi All, I have a problem working out a suitable algorithm either in PHP or MySQL. Basically I have a DB that keeps track of breeding records. Each record has a paired data, and a split-up date. I need to generate some statistics to work out average numbers of pairs per month, averaged on a

[PHP-DB] date problem

2002-03-13 Thread its me
i have an input field in a form that accept date called $date and in databse i made it of type $date so its defualt is -00-00 the problem is when i say: if($date!="-00-00") {do something} he doesn't understand $date!="-00-00" Rehab M.Shouman -

[PHP-DB] Date Returns

2002-03-15 Thread Ryan Marrs
Does anyone know if the date function returns false if it cannot convert the specified date/time to the format? If not, does anyone have a rule set they use to verify the date is a valid convertible date? I need to update a row in MSSQL, and it will fail if the date is incorrect. I've validated

[PHP-DB] Date Question

2002-04-03 Thread Jennifer Downey
Hi all, If I have a feild called 'date' and the type is date when a form is submitted isn't it suppose to automatically enter the date or do I need to somehow enter it through the form? The reason I ask is that I have another form with a date type and no reference to it in the form and it is al

[PHP-DB] Date problem

2002-05-12 Thread its me
i get $postdate from my mysql database,the problem is that i want to increase that date by 6 months?? its stored in mysql as date field

Re: [PHP-DB] Date

2002-05-22 Thread Jason Wong
On Wednesday 22 May 2002 16:51, John Fishworld wrote: > Can someone help me with the correct sytax here ! Please state which DB you're using. I assume it's MySQL. > I'm trying to show results from the last two days(or week etc) > > This is what I've got > > SELECT . > WHERE. > AND ( (DAT

Re: [PHP-DB] Date

2002-05-22 Thread John Fishworld
Sorry yes its MySQL yes it was the missing comma causing the problem (thanks) but now I get You have an error in your SQL syntax near 'LIMIT 0, 30' at line 1 SELECT DISTINCT .. WHERE (t_city.t_city_id_city = t_citystate.t_citystate_id_city) AND (t_citystate.t_citystate_id_state = t_state.t_st

Re: [PHP-DB] Date

2002-05-22 Thread Jason Wong
On Wednesday 22 May 2002 17:23, John Fishworld wrote: > Sorry yes its MySQL > yes it was the missing comma causing the problem (thanks) > but now I get > You have an error in your SQL syntax near 'LIMIT 0, 30' at line 1 > AND ((DATE_SUB(NOW(), INTERVAL 2 day) < j.stellen.t_stellen_date) LIMIT 0,

Re: [PHP-DB] Date

2002-05-22 Thread John Fishworld
Duh found it ! AND ((DATE_SUB('NOW()', INTERVAL 2 day) < 'j.stellen.t_stellen_date') should be AND ( (DATE_SUB ('NOW()', INTERVAL 2 day) ) < 'j.stellen.t_stellen_date') missing close bracket :-)) > On Wednesday 22 May 2002 17:23, John Fishworld wrote: > > Sorry yes its MySQL > > yes it was th

[PHP-DB] date problem

2002-06-05 Thread andy
Hi there, I would like to count the users out of a mysql db who registered after a certain date. The column I have in the db is a char and I do not want to change this anymore. This is how a typical entry looks like: May 29, 2002 This is how I tryed it: // while '10...' is unix timestamp june

[PHP-DB] date problem

2002-06-05 Thread andy
Hi there, I would like to count the users out of a mysql db who registered after a certain date. The column I have in the db is a char and I do not want to change this anymore. This is how a typical entry looks like: May 29, 2002 This is how I tryed it: // while '10...' is unix timestamp june

[PHP-DB] Date Comparsion

2002-06-18 Thread Jack
Dear all I had a form which let user to input the leave_from and leave_to date into, the format of the date that user input is "-mm-dd". Now i want to compare the leave_from and leave_to date to find out the number of days between! What should i do or any function in php can provide this oper

[PHP-DB] Date functions

2002-07-01 Thread Achilleas Maroulis
Hi. I want to know what is the right way to make some comparisons with date variables. I have used only the date() function to get a variable in this format=> 01-07-2002 Is there a way to add 20 days in order to have 21-07-2002 or 2 months to have 01-09-2002? Thanx in advance...

[PHP-DB] Date Add

2002-08-01 Thread John Fishworld
I thought I had this working, but it seems unfortunately not !!! I'm trying to list events for each month and my select query is as follows SELECT DISTINCT t_city_name,t_city_id_city FROM t_city,t_zipcodecity,t_location,t_event WHERE (t_city_id_city = t_zipcodecity_id_city) AND (t_zipcodecity_zi

[PHP-DB] date comparison

2002-08-21 Thread Smita Manohar
hello, in my script i want to compare input date with date stored in database and want the result for date <= input date and sometime for date >= input date. it didn't work for <= and >= operators. i also tried using "between" but it didn't give desire result :-( is there any other comparison

[PHP-DB] Date Subtraction

2002-08-21 Thread Manoj Japher
hi, Is there any way I can get previous day's date, like we get current date by using getdate() or date() function. I mean is there some in-built function in PHP which can subtract date to give me yesterday's date. I am currently calculating it using some code, which I have written and it is

[PHP-DB] Date difference

2002-08-28 Thread José Moreira
hello how can i calculate the difference in days between 2 dates in SQL or PHP ?

[PHP-DB] Date Concat?

2002-09-20 Thread Rankin, Randy
I have two fields of type date in a MySQL table called training: start_date end_date I can format the date using a select, for example SELECT DATE_FORMAT(start_date, '%M %d, %Y') as start_date, DATE_FORMAT(end_date, '%M %d, %Y') as end_date FROM training This

RE: [PHP-DB] date()

2002-11-13 Thread Aaron Wolski
$date = date("m:d:y", $myrow[datefield]); Will produce: 11:13:02 http://www.php.net/manual/en/function.date.php Aaron -Original Message- From: Edward Peloke [mailto:epeloke@;echoman.com] Sent: November 13, 2002 4:27 PM To: Php-Db Subject: [PHP-DB] date() I have a date f

RE: [PHP-DB] date()

2002-11-13 Thread SELPH,JASON (HP-Richardson,ex1)
n.com] Sent: Wednesday, November 13, 2002 3:27 PM To: Php-Db Subject: [PHP-DB] date() I have a date field in my mysql db, when I output the data to the screen, I don't want to see the minutes, just the mmddyy. I can format a date but can't seem to get it to work passing in the value from $m

Re: [PHP-DB] date()

2002-11-13 Thread Marco Tabini
If you don't want to change your SQL statement: echo date ('Y/m/d', strtotime ($myrow['datefield'])); Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com! --- Begin M

Re: [PHP-DB] date()

2002-11-13 Thread Jason Wong
On Thursday 14 November 2002 05:27, Edward Peloke wrote: > I have a date field in my mysql db, when I output the data to the screen, I > don't want to see the minutes, just the mmddyy. DATE fields in MySQL don't have the time (h:m:s). > I can format a date but > can't seem to get it to work pas

RE: [PHP-DB] date()

2002-11-18 Thread Edward Peloke
When I use this, I get 12/31/69 as my date. -Original Message- From: Aaron Wolski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 13, 2002 4:04 PM To: 'Edward Peloke'; 'Php-Db' Subject: RE: [PHP-DB] date() $date = date("m:d:y", $myrow[datefield]);

RE: [PHP-DB] date()

2002-11-18 Thread Aaron Wolski
ubject: RE: [PHP-DB] date() When I use this, I get 12/31/69 as my date. -Original Message- From: Aaron Wolski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 13, 2002 4:04 PM To: 'Edward Peloke'; 'Php-Db' Subject: RE: [PHP-DB] date() $date = date("m:d:y",

RE: [PHP-DB] date()

2002-11-18 Thread Edward Peloke
eloke'; 'Php-Db' Subject: RE: [PHP-DB] date() Ok.. I guess it depends on how your date is stored. I always use unix_timestamps. If you are too.. then the format I supplied should work as indicated. Aaron -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED]] Sen

RE: [PHP-DB] date()

2002-11-18 Thread Aaron Wolski
Sent: November 18, 2002 2:50 PM To: 'Php-Db' Subject: RE: [PHP-DB] date() it is just a datetime field and the clients use a javascript calander to pick the date, here is the exact date as it appears in the db. 2002-11-08 00:00:00 Eddie -Original Message- From: Aaron Wolski [mailto:[

Re: [PHP-DB] date()

2002-11-18 Thread Jason Wong
On Tuesday 19 November 2002 03:26, Aaron Wolski wrote: > Hmm.. I would get it into a unix_timestamp (unless someone can suggest a > reasoning for now doing so). It really depends on where you want to manipulate the dates. If mostly from within MySQL then store with DATE, DATETIME & TIMESTAMP, if

RE: [PHP-DB] date()

2002-11-18 Thread Jeffrey_N_Dyke
11/18/2002 Subject: RE: [PHP-DB] date()

RE: [PHP-DB] date()

2002-11-18 Thread Jeffrey_N_Dyke
@Keane.com To: "'Edward Peloke'" <[EMAIL PROTECTED]> cc: "'Php-Db'" <[EMAIL PROTECTED]>

[PHP-DB] Date Question

2002-11-29 Thread Chris Payne
Hi there everyone, I've never really used the date functions beyond getting it to store the current date in a db. I have a dilema in that I need to get all the days in the current month and all the days in the next month (whatever the next month is depends on the current month the script was ran)

[PHP-DB] Date Manipulation

2004-03-21 Thread Shannon Doyle
Hi People, Need some assistance in the following scenario:- Inserting a date into the database that is entered into a form by the site visitor. - This is easy enough. However I now need to use the same date that has been entered by the site visitor add 35 days and then insert into another table.

[PHP-DB] Date Select

2004-06-25 Thread Tom Chubb
How can I query a MySQL table to get the latest results from a date field? Basically, I am inserting several records at a time at the end of each week. I want to have a page that displays the results for the last week only. The date format in the field is -MM-DD

[PHP-DB] Date Conversion

2004-08-18 Thread Ng Hwee Hwee
Hi all, can someone kindly point me to a resource that converts all kinds of possible date inputs into MySQL format of -MM-DD? example of formats to be converted includes: d/m/yy d/m/ d/mm/yy d/mm/yyy dd/mm/yy dd/mm/yyy d/mmm/yy d/mmm/ dd/mmm/yy dd/mmm/ yy - 2 digit repre

[PHP-DB] Date Question

2004-10-27 Thread Bomgardner, Mark A
I am having trouble converting a date from mm/dd/ to -mm-dd on a user form. I know there was post about this, but I keep getting an error message when I try to search the archives. I have looked at the manual, but I am not finding what I am looking for. Mark A. Bomgardner Technolo

[PHP-DB] date conversions

2004-12-15 Thread neil
Hi I am needing to convert a d/m/y date such as 30/11/2004 into the format that mysql can use ie. 2004-11-20 If I try the following: $testdate="30/11/2004"; echo date("Y-m-d", strtotime($testdate)); the result is - 2006-06-11 I can't find any other function apart from strtotime to do this. An

[PHP-DB] DATE(r)

2005-09-09 Thread Ron Piggott
Question: I am trying to for the first time create a table with a column that is defined as datetime I wanted to populate that column with the date(r) command. date(r) on my web site gives this response: Fri, 9 Sep 2005 13:32:19 -0400 How may I manipulate date(r) to give a format which is comp

[PHP-DB] Date question

2006-03-12 Thread Gerry Danen
While I am rebuilding my crashed laptop (the machine that had all my intelligence), I started thinking about a select statement I need. I have log info in a table and want to extract it on a monthly basis. The date field is in -mm-dd format. What's a good way to select those dates that match 2

[PHP-DB] Date Conversion

2006-05-16 Thread Mark Bomgardner
PHP 4.4/MySQL 4.0 I am tying to convert a date to put into a database from a string (ie: January, February) to a numeric value (ie: 01,02). I am taking the value from a form, which is a drop down menu listing the months. $sMonth1 = $_POST['Smonth']; returns the money selected from the form.

[PHP-DB] Date problem

2007-01-21 Thread Denis L. Menezes
Dear friends. I have a date field in mysql called event_end . I want to run a query to find all records where the event_and is greater than today's date. I have written the following code. It does not work. Please point out the mistake. $today = getdate(); $sql="select * from events where eve

[PHP-DB] date problems

2007-09-06 Thread rDubya
I'm having a problem with dates in php and mysql. I run a site that promotes dated events and concerts and has the information for each stored in a mysql database with the timestamp field. Here is the function that checks the date of the event to ensure it is between now and three weeks from now

[PHP-DB] Date function.

2001-01-19 Thread Sharif Islam
This is a simple mysql question i am having problme with. I have a table with name and birth date; Joe | 1964-07-21 Mary | 1978-05-22 -- I want to get the name with birthdays in the month of July. thanks -- PHP Database Mailing List (http://www.php.net/) To u

[PHP-DB] DATE FUNCTIONS

2001-02-13 Thread Lynnette Klackers
I'm having problems using SQL date functions with ODBC (unix). I've browsed endless mailing lists and manuals but things that seem to work for other people doesn't work on my setup. I can get my IF statement in php working, but really need to have the validation in the select statement. Other da

[PHP-DB] Date Help

2001-03-07 Thread Faye Keesic
--MS_Mac_OE_3066812333_145812_MIME_Part Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit When I want to subtract a day from a date, and pass the date to a function that will do the subtraction and then return the new value, so why does php sometimes subtract the year, i

Re: [PHP-DB] Date

2001-03-25 Thread Felix Kronlage
On Sun, Mar 25, 2001 at 03:02:21PM +0200, [EMAIL PROTECTED] wrote: > I save the date in my MySQL db as 2001-03-25. > But in my PHP script i want do see it like 25-03-2001. > How do i get this result if you can't modify the formart the date is safed as, you could use split on the string that comes

Re: [PHP-DB] Date

2001-03-25 Thread CC Zona
In article <002f01c0b52b$d4778e00$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("[EMAIL PROTECTED]") wrote: > I save the date in my MySQL db as 2001-03-25. > > But in my PHP script i want do see it like 25-03-2001. Do it in the MySQL select. Assuming date_field is of field type 'date': select date_

[PHP-DB] Date Ranges

2001-05-02 Thread Mike Baerwolf
Hi, I'm working on a event calendar and some events span more than one day. I would like to store a date range like 2001-02-05 thru 2001-07-05 so when I do a query for the current day the event would appear for all the days in the range. I hoping someone can point me to some documentation or

[PHP-DB] Date field

2001-06-20 Thread Rosen
Hi, Can someone tell me how do stote date field in MySQL DB ? Thanks, Rosen M. -- 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 administrators, e-mail: [EMAIL PROTECTED]

[PHP-DB] Date Format.

2001-07-03 Thread John Starkey
Hello all, I'm on the last leg of a project I'm doing, and maybe I'm just too fried but I've tried several things. Can anyone help: I've created an Event Listing form. The script pulls the table names from the DB and preg's them to create the field names for the form. Any field name that contain

[PHP-DB] Date Format

2001-07-19 Thread system
Friends, I have a design, up and running scripts connected to MySQL. How do I retrieve date formats and have it displayed as dd-mm- ? I store them as DATE. CK Raju -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

RE: [PHP-DB] date

2001-10-18 Thread Dave Watkinson
mysql date format is -MM-DD including the hyphens) I usually use substr() to convert it from a user's entry to the format reqd for the database hth Dave -Original Message- From: ax [mailto:[EMAIL PROTECTED]] Sent: 18 October 2001 10:47 To: [EMAIL PROTECTED] Subject: [PHP-DB]

Re: [PHP-DB] date

2001-10-18 Thread leo g. divinagracia iii
depends on how you are entering data... if through a client, then you have to format it as MYSQL wants it. if you're going through PHP (afterall, this is a PHP DB list... ;-)), then accept it anyway you wanna, through a form on a web page, then your script will handle the convertion on how MYSQ

RE: [PHP-DB] date

2001-10-26 Thread Rick Emery
t;) AS edate FROM mytable ORDER BY edate; With basic PHP, you can format the Euro date input into the script into the -MM-DD requied for insertion into the database. -Original Message- From: ax [mailto:[EMAIL PROTECTED]] Sent: Friday, October 26, 2001 6:11 AM To: [EMAIL PROTECTED] S

Re: [PHP-DB] date

2001-10-26 Thread Russ Michell
User inserts date as a select menu for day, month and year: $day, $month, $year You swap it around for an insert: $dateinsert = $year . $month . $day Then query the DB: Select blah from blah where blah=blah order by datefield (Let MySQL do the rest) Good luck! Russ On Fri, 26 Oct 2001 12:10:51

Re: [PHP-DB] date

2001-10-26 Thread Steve Cayford
gt; edate; > > With basic PHP, you can format the Euro date input into the script into > the > -MM-DD requied for insertion into the database. > > -Original Message- > From: ax [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 26, 2001 6:11 AM > To: [EMAIL PROTECT

RE: [PHP-DB] date

2001-10-26 Thread Rick Emery
Yes, PHP is nice. But the more we force MySQL to perform, the less is required of PHP and the script writer. -Original Message- From: Steve Cayford [mailto:[EMAIL PROTECTED]] Sent: Friday, October 26, 2001 9:49 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] date Check out the date

[PHP-DB] Date calculation

2001-11-12 Thread Ben S.
How do you get the date that is 14 days from today's date. I am using PHP4 and MySQL. I can get that date with MySQL monitor but php. I have tried many things but nothing works. Does anyone give me a help? Thank you. Ben -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail

[PHP-DB] Date Calculation

2001-11-12 Thread Ben S.
How do you get the date that is 14 days from today's date? I can get that date with mysql monitor but PHP. I am using PHP4 and MySQL. I have tried many things but nothing works. Does anyone give me a help? Thank you. Ben -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail

[PHP-DB] date help

2001-11-17 Thread Srinivasan Ranganathan
Hi I need to store the date and time of sign-up and date and time of last successful login in a mysql database and calculate how long the user has been using a site. how do i do this? thanks in advance Srinivasan __ Do You Yahoo!? Everything you'l

[PHP-DB] Date Question

2003-02-19 Thread Chris Payne
Hi there everyone, I have the following 2 dates (FOr example): 19-02-2003 21-02-2003 How can I easily find out how many nights there are between the 2 dates? For example, the above would be 2 nights as the 21st would be the checkout date. I have the use the format about as that is how the in

RE: [PHP-DB] Date

2003-02-28 Thread Snijders, Mark
go to mysql.com en look for date -Original Message- From: Jorge Miguel Fonseca Martins [mailto:[EMAIL PROTECTED] Sent: vrijdag 28 februari 2003 16:23 To: [EMAIL PROTECTED] Subject: [PHP-DB] Date How can a make a query that lists all the fields where a datefield as the date of tomorow

[PHP-DB] date functions

2003-03-04 Thread David Rice
I am looking for a way to take a date stored in a mysql database... and find out the date seven days later. how would i do this?! cheers, dave _ Chat online in real time with MSN Messenger http://messenger.msn.co.uk -- PHP Data

[PHP-DB] date functions

2003-03-04 Thread David Rice
I want to use it in this function that i am creating (it's for a resteraunt automated tips system, to work out how much tips each staff member is entitled to. function tips($weekstart){ /* JUST BELOW HERE IS WHE

[PHP-DB] Date problem

2003-07-14 Thread Chris Payne
Hi there everyone, I use the below code to grab the current date, convert it to a unix timestamp to do some bits then it's supposed to change the date back with the new values (IE: current date - x amount of seconds) but it's not doing it correctly, it's probably DEAD obvious to everyone as my

[PHP-DB] date function

2003-09-05 Thread Darryl
Greetings, I have some php code that pulls from the mysql database. Here it is: "; while ($r = mysql_fetch_array($result)) { $name = $r["name"]; $hyear = date('Y',$r["hdate"]); $timein = $cyear - $hyear; if ($timein > 0) { echo "$name$timein

[PHP-DB] date function

2003-11-02 Thread OpenSource
Hi guys, This might not be the best place for this but here goes. I want to create a dropdown list with a date range of -- Today Yesterday Fri 10/31 Thu 10/30 Wed 10/29 Tue 10/28 Mon 10/27 Sun 10/26 Sat 10/25 Fri 1

[PHP-DB] Date Pulldown

2003-11-02 Thread Peter Westergaard
Sorry for what is probably going to be a late reply. I'm waiting to pick someone up at the airport, and the plane was delayed, so I wanted to try my hand at answering your question. First I had to figure out what method you used to pick those dates in the first place. It seems to be... Today

Re: [PHP-DB] Date operations.

2002-01-29 Thread DL Neil
Wow Garry, I know that I like to kick-start my brain by getting 'into' a list problem/challenge in the (London) mornings, but today I'm completely beaten. Thanks for the broad explanation, which is probably quite meaningful, but I'm not into breeding (could that statement be misunderstood?) and

Re: [PHP-DB] Date operations.

2002-01-29 Thread Garry Optland
On Wed, 30 Jan 2002, DL Neil wrote: > > Can I request some db-speak please? You already have a tbl (or more). > So let's start by asking for the table definitions The table definition is as follows: CREATE TABLE breeding ( rec SMALLINT(4) UNSIGNED AUTO_INCREMENT, sire SMALLINT(4) UNSIGNED,

Re: [PHP-DB] Date operations.

2002-01-29 Thread DL Neil
Garry, I regret to say that I can't see an immediate answer. > CREATE TABLE breeding ( > rec SMALLINT(4) UNSIGNED AUTO_INCREMENT, > sire SMALLINT(4) UNSIGNED, > dam SMALLINT(4) UNSIGNED, > paired DATE, > split DATE, > num_offspring TINYINT(1) ZEROFILL, > PRIMARY KEY (rec) > ); > > >

Re: [PHP-DB] Date operations.

2002-01-29 Thread Miles Thompson
Garry, Could you please explain (define) in one sentence(paragraph) what end result you want. It might be possible to handle it in one SQL statement. Miles Thompson At 09:54 AM 1/30/2002 +1100, Garry Optland wrote: >On Wed, 30 Jan 2002, DL Neil wrote: > > > > > Can I request some db-speak plea

Re: [PHP-DB] Date operations.

2002-01-29 Thread Garry Optland
On Thu, 31 Jan 2002, DL Neil wrote: > Garry, > I regret to say that I can't see an immediate answer. > > > CREATE TABLE breeding ( > > rec SMALLINT(4) UNSIGNED AUTO_INCREMENT, > > sire SMALLINT(4) UNSIGNED, > > dam SMALLINT(4) UNSIGNED, > > paired DATE, > > split DATE, > > num_offspr

Re: [PHP-DB] Date operations.

2002-01-30 Thread DL Neil
Garry, > > > CREATE TABLE breeding ( > > > rec SMALLINT(4) UNSIGNED AUTO_INCREMENT, > > > sire SMALLINT(4) UNSIGNED, > > > dam SMALLINT(4) UNSIGNED, > > > paired DATE, > > > split DATE, > > > num_offspring TINYINT(1) ZEROFILL, > > > PRIMARY KEY (rec) > > > ); > > > > > > First, we d

Re: [PHP-DB] date problem

2002-03-14 Thread DL Neil
Rehab, > i have an input field in a form that accept date called $date and in databse i made it of type $date so its defualt is -00-00 > > the problem is when i say: > if($date!="-00-00") > {do something} > > he doesn't understand $date!="-00-00" Please copy-paste the actual error m

RE: [PHP-DB] date problem

2002-03-14 Thread Rick Emery
if( strcmp($date,"-00-00") ) { do something} -Original Message- From: its me [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 12:16 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] date problem i have an input field in a form that accept date called $date and in data

Re: [PHP-DB] Date Returns

2002-03-15 Thread Jason Wong
On Saturday 16 March 2002 00:14, Ryan Marrs wrote: > Does anyone know if the date function returns false if it cannot convert > the specified date/time to the format? If not, does anyone have a rule set > they use to verify the date is a valid convertible date? I need to update > a row in MSSQL,

Re: [PHP-DB] Date Returns

2002-03-16 Thread kras
> Does anyone know if the date function returns false if it cannot convert the > specified date/time to the format? If not, does anyone have a rule set they > use to verify the date is a valid convertible date? I need to update a row > in MSSQL, and it will fail if the date is incorrect. I've

RE: [PHP-DB] Date Question

2002-04-03 Thread Beau Lebens
// -Original Message- // From: Jennifer Downey [mailto:[EMAIL PROTECTED]] // Sent: Thursday, 4 April 2002 8:27 AM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] Date Question // // // Hi all, // // If I have a feild called 'date' and the type is date when a form is // submitted isn&#x

Re: [PHP-DB] Date Question

2002-04-03 Thread root
ifer Downey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 03, 2002 5:26 PM Subject: [PHP-DB] Date Question > Hi all, > > If I have a feild called 'date' and the type is date when a form is > submitted isn't it suppose to automatical

RE: [PHP-DB] Date problem

2002-05-12 Thread Pierre-Alain Joye
> i get $postdate from my mysql database,the problem is that i want > to increase that date by 6 months?? > its stored in mysql as date field http://www.mysql.com/doc/D/a/Date_and_time_functions.html check DATE_ADD :) hth pa -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

[PHP-DB] date format display

2002-06-10 Thread fabrizio
Hello dear all, in my mysql-db I have a date_tbl with this format: (20020531). how is possible in PHP do display date_tbl's values in a more human-readable format like 05-31-2002 or 31/05/2002 ? thaks in advance, regards fabrizio -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] Date functions

2002-07-01 Thread [EMAIL PROTECTED]
On Mon, 1 Jul 2002, Achilleas Maroulis wrote: > Hi. > I want to know what is the right way to make some comparisons with date variables. > I have used only the date() function to get a variable in this format=> 01-07-2002 > Is there a way to add 20 days in order to have 21-07-2002 or 2 months to

[PHP-DB] DATE vs INT

2002-07-02 Thread Russ
Hi all: Our company uses for reasons of experience, an INT(10) field for storing dates in a MySQL DB. ((We just DO OK! ;-)) However I it is because the date isn't stored as a DATE or DATETIME (etc) that I can't do an accurate ORDER BY - as MySQL doesn't recognise the field's content as a valid d

[PHP-DB] Date Times stuff

2002-07-03 Thread John Fishworld
Banging my head against a wall with this ! Hope someone can help ! Using MySQL Trying to list cities with events for that month I've correctly (i think) formatted my date to a datetime style for MySQL $month is there chosen one $tosearch = date("Y-$month-d 00:00:00"); And then this is my inq

Re: [PHP-DB] date problem

2002-07-05 Thread ditoiu cristian
maybe you should try if($date!=="-00-00") {do something} "Dl Neil" <[EMAIL PROTECTED]> wrote in message 0df801c1cb3d$c947e420$c200a8c0@jrbrown">news:0df801c1cb3d$c947e420$c200a8c0@jrbrown... > Rehab, > > > i have an input field in a form that accept date called $date and in > databse i made i

[PHP-DB] Date comparison problem

2002-07-10 Thread Gabor Niederlaender
Hi all! I have got a "datetime" field in a MS-SQL DB, and I have a "date field" in my html-form with the format: DD/MM/. I would like to compare the two, but I think the two formats are a bit different and they do not really want to be compared:) If I write a query to write out the "datetim

Re: [PHP-DB] date comparison

2002-08-21 Thread Jason Wong
On Wednesday 21 August 2002 21:28, Smita Manohar wrote: > hello, > in my script i want to compare input date with date stored in database and > want the result for date <= input date and sometime for date >= input date. How is the date stored? What type of field? > it didn't work for <= and >= o

RE: [PHP-DB] Date Subtraction

2002-08-21 Thread Hutchins, Richard
r page. That might not be what you want. As I said before, I might have missed something, but that's what I found out after looking for all of two minutes. Rich -Original Message- From: Manoj Japher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 2:23 PM To: [EMAIL PRO

Re: [PHP-DB] Date Subtraction

2002-08-21 Thread Jason Wong
On Thursday 22 August 2002 02:23, Manoj Japher wrote: > hi, > Is there any way I can get previous day's date, like we get > current > date by using getdate() or date() function. I mean is there some > in-built function in PHP which can subtract date to give me > yesterday's date. > I am curren

RE: [PHP-DB] Date Subtraction

2002-08-21 Thread Hutchins, Richard
Oh, in MySQL, there's also DATE_SUB(). Forgot to mention that one. Rich -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 2:40 PM To: 'Manoj Japher'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Date Subtraction Manoj, J

RE: [PHP-DB] Date Subtraction

2002-08-21 Thread Ryan Jameson (USA)
PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Date Subtraction hi, hey you are bang on target. It did solve my problem. Thanks a lot, Manoj On Wed, 21 Aug 2002 [EMAIL PROTECTED] wrote : > >if you really just want yesterday, i use date("Y-m-d", time() -

Re: [PHP-DB] Date Concat?

2002-09-20 Thread Rick Widmer
At 07:07 AM 9/20/02 -0500, Rankin, Randy wrote: > SELECT > DATE_FORMAT(start_date, '%M %d, %Y') as start_date, > DATE_FORMAT(end_date, '%M %d, %Y') as end_date > FROM training > >This produces the following: > > start_date: September 16, 2002 > end_date: Sepetember 20, 2001

  1   2   3   >