|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
hey,
in all my PHP apps, I use the following (sort of) code to get my results... PHP Code:
but since I learnt to use that a few years ago, I have seen people using things like: PHP Code:
I wondered.... what is this method of connecting, and how does it differ from my first example... any suggestions or examples will be much appreciated!! ![]() |
|
#2
|
|||
|
|||
|
OOP
![]() PHP Code:
__________________
-- Jason |
|
#3
|
|||
|
|||
|
cheers jason!!
another question.... how is that then used? If I had the following in the db... - name - username - password - age if that connection is in another file, say connection.php.... but then in "getuser.php" I wanted to get the username and password.... how do I access the connection? $this->username ?? thanks!! ![]() |
|
#4
|
|||
|
|||
|
well,....keep in mind that what I have shown you is meerly for setting up connectivity to the db.
PHP Code:
To make this work. PHP Code:
What you want to do is access your database connection and your sessions at the same time. Check out Jpenn's Session handler, it is very nice. It should give you some ideas on how to manage your db connections. http://www.cheetah-soft.com/csh/ Last edited by Taelo : June 20th, 2003 at 10:46 AM. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > $this->dbfield help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|