note 57425 deleted from function.date by derick

From: Date: Sun, 11 Jun 2006 11:38:06 +0000
Subject: note 57425 deleted from function.date by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-114236@lists.php.net to get a copy of this message
Note Submitter: vitorsuporte at hotmail dot com ---- If you want to use date(‘W’, <TIME_STAMP>) to generate week numbers for mysql querys, you need to set the "mode" argument in the mysql YEARWEEK() function to a value that returns only weeks that have more than 3 days (1, 3, 4, 6). Example: <?php $sql = “SELECT project_name FROM project WHERE YEARWEEK(project_start_date, 1) = “.date(‘W’); ?> Check MySQL manual for more details.

« previous php.notes (#114236) next »