Re: Mysqli support - test or complain? [SOLVED]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So? It's there - use it.

So are cookies, would you stuff this into a cookie? No, because that's not what cookies are there for.

Not because "it's not what cookies are for" - but because sessions are a more efficient and easier to use storage medium.

You could potentially be pointlessly duplicating that data hundreds or thousands of times depending on how busy your site is.

Well as always, if that's a concern then more thought would be required. But storage constraints are rarely a concern nowadays.

Also, in this particular example there is no need to cache that information beyond the request level because asking PHP for it is not an expensive operation, or at the very least is no more expensive than maintaining it in a session.

Granted.

One other thing to note is that putting it in the session will survive a rebuild of PHP to add/remove modules and a restart of the web server. It's probably not likely to happen but that could seriously break your application.

Then use the function directly.

--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

** NOW OFFERING FREE ACCOUNTS TO CHARITIES AND NON-PROFITS **

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux