note 19437 deleted from function.strtotime by vincent

From: Date: Thu, 11 Sep 2003 19:41:10 +0000
Subject: note 19437 deleted from function.strtotime by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-56172@lists.php.net to get a copy of this message
Note Submitter: msopacua@idg.nl ---- What you should or shouldn't do, totally depends on your context. For instance, using format functions in WHERE clauses, disables the use of the index on that field in mySQL I tried the EXPLAIN on postgres, but that doesn't give me much information And something like this: <?php class task { function task($db, $id) { $sql="SELECT * FROM tasks WHERE id='$id'"; $rs=pg_exec($db, $sql); $row=pg_fetch_row($rs); foreach($row as $key => $value) { $this->$key=$value; } } } ?> becomes totally unusable. While it is questionable to parse date-output as a string, because one depends on both the DB output and the php parser not changing, it can be quite useful.

« previous php.notes (#56172) next »