type of value that are readed from a DB

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

type of value that are readed from a DB

Post by pelegk2 »

when iread vakues from mysql using

Code: Select all

<?php
mysql_fetch_array
?>
and the values are defined in the DB as float why when i access them i see that they are defined as string?
thanks in advance
peleg
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

MySQL and PHP's data types are completely separate - e.g. PHP doesn't have a DATETIME type does it? You can force the type of a variable in PHP - check the manual for more info.

Mac
Post Reply