note 14961 added to function.settype.php
| From: | hhoorweg at dds dot nl | Date: | Wed, 22 Aug 2001 16:28:23 +0000 |
| Subject: | note 14961 added to function.settype.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16994@lists.php.net to get a copy of this message | ||
I'm working with MySQL database and I wonder if it's possible to set a type for a
generated field in this way:
$sql= "SELECT AVG(figures) AS avgfigure FROM table";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
settype($row[avgfigure], "integer");
echo $row[avgfigure];
It seemed it didn't work out. Could someone tell me a reason?
Hans.
http://www.php.net/manual/en/function.settype.php