Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 23, 2012, 11:15:56 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
155404
Posts in
21698
Topics by
7730
Members
Latest Member:
anybig0391d
WebsiteBaker Community Forum
English
Help & Support
(Moderators:
Argos
,
badknight
)
a question about the global valuriable
Pages: [
1
]
Go Down
Author
Topic: a question about the global valuriable (Read 450 times)
faquir
Offline
Posts: 49
a question about the global valuriable
«
on:
July 14, 2008, 04:28:59 PM »
when I read some thread about the latest new section, I found a very interesting part is
global $database;
$result = $database->query($query);
$total = $result->numRows();
I can not understand this coding writing, which I think it should be,
$database = new database();
then can access the methods in the database class.
could someone explain to me that, global $database; is the other way new a class?
Thanks.
Logged
faquir
Offline
Posts: 49
Re: a question about the global valuriable
«
Reply #1 on:
July 15, 2008, 03:46:42 PM »
is that wrong place I post?
Logged
pcwacht
AddOn Development
Offline
Posts: 2855
Re: a question about the global valuriable
«
Reply #2 on:
July 15, 2008, 06:26:50 PM »
Not the wrong place, I think
What I understand, and maybe I am wrong as well
By declaring the $database as global the allready existed $database is used so no new instance is needed.
Look at her for more info
http://nl.php.net/global
Have fun,
John
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...