On Thu, 27 May 2010, Arvids Godjuks wrote:

> Please read more carefully - what I mean that is we deal mostly with
> numbers witch are represented as strings, because all data that comes
> from external sources are STRING regardless of actual contents - be
> that integer or float - no matter. I don't want to make my code look
> like this:
> 
> function doSomeStuffWithDbData(int $id, string $name, int $someFlag) {
> }
> 
> $sql = 'SELECT id, name, some_flag, .... FROM table WHERE .....';
> $res = mysqli_query($db, $sql);
> $row = $res->fetch_assoc();
> doSomeStuffWithDbData((int)$row['id'], $row['name'], (int)$row['some_flag']);

PDO's bind values already provide the correct type if you specify so. So 
this is moot point.

regards,
Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to