Re: [PHP-DB] Date problem again ;-)

2005-03-22 Thread Forest Liu
I suppose there is a  submit_time field in your DB table, so you could:
SELECT * FROM `tablename` WHERE `submit_time`=.lastdays(3)

lastdays() is a function you could create using mktime(),time(), and date()


On Tue, 22 Mar 2005 16:28:39 -0500, Chris Payne [EMAIL PROTECTED] wrote:
 Hi there everyone,
 
 OK I'm using the following in my query to display entries in the LAST 3
 days:
 
 DATE_SUB(CURDATE(),INTERVAL 3 DAY) = ListingDate
 
 But it doesn't seem to affect the results, the date format in my DB column
 (ListingDate - datatype is Date) is 2000-00-00 as in year, month and date -
 is THAT the problem?  That it needs to be an actual timestamp?  If that is
 the case I'm not sure how to approach this because the data MUST be in the
 above format as it comes from a central DB every night.  All I need to do is
 display the current date plus also the previous x amount of days in between.
 
 I'm using PHP 4 with MySQL 4.0.22 (Not the latest MySQL I know, sigh).
 
 
 Chris
 
 


-- 
   Sincerely,
 Forest Liu()

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



Re: [PHP-DB] Working with multiple tables...

2005-03-21 Thread Forest Liu
seems that you should redesign your DB table field structure...to let
your query easier.


On Mon, 21 Mar 2005 13:44:54 -0600, NIPP, SCOTT V (SBCSI)
[EMAIL PROTECTED] wrote:
I am working on revising a web request app that I have already
 developed.  The app basically provides a list of system names with
 checkboxes for a user to select to request accounts on the systems.  One
 feature I am intending to add is that the app should check a separate
 database of user accounts to see if the user already has an account on
 the system.  I think I could get it to work by making a query of the
 userid for each system, but this seems quite inefficient.  I would
 rather somehow have a single query that gets a list of system names and
 also checks the user account database at the same time to determine if
 the user already has an account.  Then I would like to display ALL of
 the systems, but grey out the ones that the user already has accounts
 on.  Can someone help me figure out the best way to go about this?
 Thanks in advance.
 
 Scott Nipp
 Phone:  (214) 858-1289
 E-mail:  [EMAIL PROTECTED]
 Web:  http:\\ldsa.sbcld.sbc.com
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
   Sincerely,
 Forest Liu()

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



Re: [PHP-DB] History of MySQL support in PHP

2005-03-19 Thread Forest Liu
I think you can check the changelog on www.php.net


On Sat, 19 Mar 2005 14:13:44 +0100, Stefan Reimers
[EMAIL PROTECTED] wrote:
 Hi list,
 
 can anyone tell me, when PHP originally started the MySQL support? I
 downloaded the php 3.0.17 version from php.net and it already supports
 MySQL.
 
 Thx in advance
 Stefan
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
   Sincerely,
 Forest Liu()

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



Re: [PHP-DB] History of MySQL support in PHP

2005-03-19 Thread Forest Liu
You can find many interest thing from this page:
http://cvs.php.net/phpfi/ChangeLog

as you see, that is php/fi (or so called php2).
from this page, I find the oringin support to MySQL is added in PHP/FI
1.198 by rasmus ,Mon Dec 2 13:19:17 1996 (8 years, 3 months ago):
Add initial rough mysql support [EMAIL PROTECTED]

A historial time. :)


On Sat, 19 Mar 2005 14:26:44 +0100, Stefan Reimers
[EMAIL PROTECTED] wrote:
 The changelog reaches back to the first beta of PHP4
 
 Forest Liu wrote:
  I think you can check the changelog on www.php.net
 
 
  On Sat, 19 Mar 2005 14:13:44 +0100, Stefan Reimers
  [EMAIL PROTECTED] wrote:
 
 Hi list,
 
 can anyone tell me, when PHP originally started the MySQL support? I
 downloaded the php 3.0.17 version from php.net and it already supports
 MySQL.
 
 Thx in advance
 Stefan
 
 --
 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
 
 


-- 
   Sincerely,
 Forest Liu()

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



Re: [PHP-DB] History of MySQL support in PHP

2005-03-19 Thread Forest Liu
Maybe he is writing a book Leading to Creativity: the road of PHP and
its father
haha
just joking

my pleasure to read the post from Mr.Lerdorf 
and best wishes from all Chinese PHP programer.

On Sat, 19 Mar 2005 07:41:55 -0800, Rasmus Lerdorf [EMAIL PROTECTED] wrote:
 The actual code for the first MySQL extension was just a search and
 replace of msql-mysql in the original msql extension I wrote before
 that.  I found 1995'ish documentation for that the other day:
 
http://lerdorf.com/php/msql.html
 
 And that extension was based on the original msql support in PHP version
 1 dating back to around March or April of 1995.  You can see that code
 in the PHP 1.0.8 tarball located at http://museum.php.net.
 Unfortunately I didn't use CVS in the early days so we don't have
 revision history going back that far.
 
 But I am curious, why do you want to know?
 
 -Rasmus
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
  Sincerely,
Forest Liu()

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