Class and Php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Calimero
Forum Contributor
Posts: 310
Joined: Thu Jan 22, 2004 6:54 pm
Location: Milky Way

Class and Php

Post by Calimero »

I havent used classes a lot before, but I got an info from my friend that using classes is much, much faster and more economic than using the database ( he didn't gave me the exact example, but my question follows ).

Because I intend to make some search engine - need a lot of resource load cutting, are the classes a good thing to use. I would use them for comparison as my mostly used tables from the DB, and for string and security checks of input type data.

And one more thing - as I mentioned I'm very new to C., can you make classes to represent hierarchical structure or IF-ELSE structure - something like if this parameter is 1, go to this class etc...


No code is needed, just a quick tip because I don't actualy know WHAT ARE CLASSES USED FOR - for what they are best suited for, and should I choose between the lots of CLASSes and PHP coding - or MySQL DB queries and tables.

Direct help or pointing to some GOOD ( or better ) on-line sources are all welcome.


Thanks Ahead !


P.S.
Why did you switch to this INPUT text design - the former didn't make my eyes hurt while typing.
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Google is your friend.
method_man
Forum Contributor
Posts: 257
Joined: Sat Mar 19, 2005 1:38 am

no!!!

Post by method_man »

NO!!! :'( its my friend
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

We all love google. Let's share the friendship :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

if the data is in a database already, the databases' search systems will likely be far faster at finding the data you want instead of creating your own. This is partly due to you requiring to request all data from the database and storing off the info as you search.. not very efficient considering the memory limits imposed to most instances of php.

As for what classes are for.. read the fairly recent threads in the theory board.
User avatar
Calimero
Forum Contributor
Posts: 310
Joined: Thu Jan 22, 2004 6:54 pm
Location: Milky Way

oki

Post by Calimero »

for the first two:

thanks for the "love" :D

for the last - hmmm, thanks I'll look at it.
Post Reply