Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
| Search | Today's Posts | Mark Forums Read
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 4th, 2006, 12:19 PM
Registered User
 
Join Date: Feb 2006
Location: Aberdeen, , United Kingdom.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database Session Class

Hello,

This is my first post and I'm no PHP expert so please be patient with me. ;)

I'm currently reading Chapter 15 Sessions and Authentication of Professional PHP and need some help.

One of the private member variables stores a Db handle and the book mentions that 'In production environments this would be declared elsewhere as a global resource, and the UserSession class would make use of it the same as any other.'. What exactly does that mean?

Does this mean that I can simply create a Db handle at the top of my page and the class should use this? I'm looking to use PDO/MySQL to connect to my database and at the moment I simply have an include that handles my Db connection. How do I go about integrating my Db connection with the UserSession class?

Thanks



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to customise class.database.php raoof PHP Databases 0 December 31st, 2007 11:48 AM
HOW-TO Maintain a Class Object in Session laksa ASP.NET 1.x and 2.0 Application Design 1 April 28th, 2005 09:21 PM
Accessing Session variables from custom class mohyneenm ASP.NET 1.0 and 1.1 Professional 2 January 26th, 2005 07:25 PM
DataBase Class stu9820 ASP.NET 1.0 and 1.1 Basics 2 July 29th, 2004 02:39 PM
help : Database class thy ADO.NET 2 June 9th, 2004 11:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.