Hello Octavian,

Tuesday, November 16, 2004, 12:53:24 PM, you wrote:

OR> I have tried using the function is_numeric to test which of the values
OR> returned from MySQL are numbers, but none of them appear to be a number, so
OR> I cannot convert them.

Because, unless you cast it otherwise, MySQL always returns strings.

You can use either:

$num = intval($mysql_num);

or just cast it:

$num = (int) $mysql_num;

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to