note 71166 added to function.pdo-sqlitecreateaggregate

From: Date: Tue, 14 Nov 2006 15:06:17 +0000
Subject: note 71166 added to function.pdo-sqlitecreateaggregate
Groups: php.notes 
Request: Send a blank email to php-notes+get-119725@lists.php.net to get a copy of this message
If you try it out, the code example given here doesn't actually work. The PDO sqliteCreateAggregate() function requires a different method prototype for the step function than does sqlite_create_aggregate(). Instead of <?php function max_len_step(&$context, $string) { if (strlen($string) > $context) { $context = strlen($string); } } ?> the function needs to be <?php function max_len_step(&$context, $rownum, $string) { if (strlen($string) > $context) { $context = strlen($string); } return $context; } ?> ---- Server IP: 64.71.164.2 Probable Submitter: 128.175.65.101 ---- Manual Page -- http://www.php.net/manual/en/function.pdo-sqlitecreateaggregate.php Edit -- https://master.php.net/note/edit/71166 Del: integrated -- https://master.php.net/note/delete/71166/integrated Del: useless -- https://master.php.net/note/delete/71166/useless Del: bad code -- https://master.php.net/note/delete/71166/bad+code Del: spam -- https://master.php.net/note/delete/71166/spam Del: non-english -- https://master.php.net/note/delete/71166/non-english Del: in docs -- https://master.php.net/note/delete/71166/in+docs Del: other reasons-- https://master.php.net/note/delete/71166 Reject -- https://master.php.net/note/reject/71166 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#119725) next »