ID:               38805
 User updated by:  gkrajci at arescorporation dot com
 Reported By:      gkrajci at arescorporation dot com
 Status:           Assigned
 Bug Type:         PDO related
 Operating System: Windows NT PBMA-WB2 5.2 build 37
 PHP Version:      5.1.6
 Assigned To:      wez
 New Comment:

Trying $pdo->query('SET TEXTSIZE {number}'); did not work...

$dbh = new PDO($pdo_dsn, $db_user, $db_password);
$sql = "SELECT the_content, DATALENGTH(the_content) AS d_l FROM content
WHERE content_id = 578";
$dbh->query('SET TEXTSIZE 300000'); 
$stmt = $dbh->prepare($sql);
$stmt->execute();
while ( $row = $stmt->fetch() ) {
    $video_count++;
    echo 'LENGTH: '.strlen($row["the_content"]).', '.$row["d_l"].'<br
/>';
}

OUTPUT:

LENGTH: 4096, 24868


Previous Comments:
------------------------------------------------------------------------

[2008-07-30 13:18:39] kristaps at kraksti dot lv

Hello!

 Have you tried $pdo->query('SET TEXTSIZE {number} ');
Where number is text size (in bytes). Max number is 2 GB in bytes.

------------------------------------------------------------------------

[2008-06-20 13:39:10] mcleod at spaceweb dot nl

Also on:
OS: Windows XP Pro
PHP version: 5.2.5
MSSQL server 2005
It worries me that it affects Zend_Db. I experienced it using PDO
directly.

------------------------------------------------------------------------

[2008-06-19 07:01:26] Phil dot H at gmx dot net

please fix that bug, this is also a problem if you want to use zend_db
or something like that! This makes the whole zend_db classes useless!

------------------------------------------------------------------------

[2008-06-18 12:04:35] me at opensol dot com

I can confirm this bug in php 5.2.5

This is a heavy bug, please fix this soon! 

A setting like 
mssql.textlimit = 2147483647
mssql.textsize = 2147483647
would be great!

------------------------------------------------------------------------

[2008-03-27 08:25:53] andrew-law at yandex dot ru

It's a pity php developers don't hear their colleagues. This is a
critical bug and it hasn't fixed yet.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/38805

-- 
Edit this bug report at http://bugs.php.net/?id=38805&edit=1

Reply via email to