Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Password Reminder
Register
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:21 AM.


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