You are here: Re: SESSIONS « PHP Programming Language « IT news, forums, messages
Re: SESSIONS

Posted by Erwin Moller on 05/08/06 12:59

jantox@gmail.com wrote:

> Good day,
>
> We have some Java programmers in our software dev, and they are
> pressuring us to use Sessions to store data and use that Session to get
> query data. They say that it is ok since it is like Entities in Java. I
> am baffled as a .NET programmer, we tend to avoid using sessions and
> instead use DataSet, is there any equivalent of dataset in PHP?

Hi,

I would NOT advise storing a complete resultset in your session.
If you store it simply in your session, you store a resourceID, which is
unusable next invocation of any script using the same session.

You can however store an array-representation of the resultset in your
session.

If you use ADODB as a databaseabstractionlayer, you can do the following:
$res = $conn->Execute($SQL)->GetArray();

Beware however that big resultsets stored in session is asking for
performancetroubles.

Also, if you want to see your session:
<pre>
<? print_r($_SESSION); ?>
</pre>

Regards,
Erwin Moller

 

Navigation:

[Reply to this 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

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