RE: [PHP-DB] ** Help php/mySql - dateproblem**

From: Date: Tue, 14 Nov 2000 21:22:55 +0000
Subject: RE: [PHP-DB] ** Help php/mySql - dateproblem**
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4439@lists.php.net to get a copy of this message
$timestamp10 = mktime(0,0,0,date("m"),date("d")+10,date("Y")); $in10days = date("Y-m-d",$timestamp10); $result = mysql_query("SELECT * FROM table"); while ($row = mysql_fetch_array($result)) { $dbdate = $row['date']; if ($dbdate == $in10days) { //do some stuff because the date in db = in 10 days } } -----Original Message----- From: Tyrone Froberg [mailto:info@djn.nu] Sent: Tuesday, November 14, 2000 4:05 PM To: php-db@lists.php.net Subject: [PHP-DB] ** Help php/mySql - dateproblem** i wounder if someone can help me out whit this; I need to get info. from a table depending on what date it is today.. --------------------------------------------------------------- | ID | DATE | info | --------------------------------------------------------------- | 1 | 001101 | bla1 | --------------------------------------------------------------- | 1 | 001101 | bla2 | --------------------------------------------------------------- | 1 | 001101 | bla3 | --------------------------------------------------------------- | 1 | 001102 | bla4 | --------------------------------------------------------------- | 1 | 001103 | bla5 | --------------------------------------------------------------- a.s.o I need the info from table whit todays date +6 days OR this week (ofcourse, then i have week in it to.. **s**) anyone have any good idea of this problem or any URL that i can visit..... have php4 and mySql regards Tyrone -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#4439) next »