[PHP-DB] Sample Code

2004-06-15 Thread Mike Koponick
Hello all,

I was wondering if anyone had some sample code that I could use for a
small project.

What I would like to do is select data in a date field, like:

From: 6-1-04
To: 6-15-04

Then output to a text file. I have other selections within this data
that I will make, and I think can figure out. The part I'm having
trouble with is exporting the data and selecting between two dates.

I'm running PHP4 and MySQL 4.1.

Thank in advance for your help.

Mike

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Sample Code

2004-06-15 Thread Gary Every
Here's a quick and easy one though:

SELECT * from your_table WHERE your_date_field BETWEEN '2004-06-01' AND
'2004-06-15';


Gary Every
Sr. UNIX Administrator
Ingram Entertainment Inc.
2 Ingram Blvd, La Vergne, TN 37089
Pay It Forward!

-Original Message-
From: Mike Koponick [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Sample Code

Hello all,

I was wondering if anyone had some sample code that I could use for a
small project.

What I would like to do is select data in a date field, like:

From: 6-1-04
To: 6-15-04

Then output to a text file. I have other selections within this data
that I will make, and I think can figure out. The part I'm having
trouble with is exporting the data and selecting between two dates.

I'm running PHP4 and MySQL 4.1.

Thank in advance for your help.

Mike

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php