Reply to Re: Any possible reason why "$line.serialize($rs2)" refuses to execute?

Your name:

Reply:


Posted by Janwillem Borleffs on 01/14/06 00:05

Rafi B. wrote:
> This is the context in which it is executed:
> $line = "====1,$tt,$sql\n";
> $rs2->sql = $rs->sql;
> $rs2->oldProvider = $rs->dataProvider;
> $rs2->InitArrayFields($rows,$flds);
> $rs2->fetchMode = $savefetch;
> return $line.serialize($rs2);
>
[...]
> Any help why serialize() will just crash like this?
>

Well, for one thing, $line.serialize() isn't valid PHP syntax for a method
call, because of the dot. That it executes on your friend's system probably
has to do with his error_reporting and display_errors settings. Ask him if
queries ever get cached and the answer probably will be negative.

When the $rs2 object contains the serialize method, you probably should do
something like:

return $rs2->serialize();

When, however, you goal is to apply the native PHP serialize function, the
call probably should be:

return serialize($rs2);


JW

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация