Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=316681.0
  2. I used to use dynamically loading js, but it ended up being allot more efficient to put all js into one file and the minify it. Its the actual http requests to multiple files that hurts more than size. Of course it would also depend on what sizes where talking about. Loading a 50k-80k file just to use one function etc etc.
  3. How do you propose to write JOIN queries then?
  4. date_default_timezone_set requires php5.
  5. Is there a particular reason your using php4 ?
  6. You can use php includes or ssi for this. Nothing you can do with CSS though.
  7. Well, to be precise, the one starting with ./ is an absolute path and the other is relative. They both however point to the same location. ps: These have nothing to do with php per say either. The are part of your OS's file system.
  8. I don't think so. Good design is not an afterthought.
  9. Your example fails to guarantee the objects being passed in do what is expected. Sorry if it sounds harsh but that is a massive floor.
  10. How? An example. <?php abstract class Foo { abstract function bar(); abstract function bob(); } class A extends Foo { public function boo() { echo "This is A->boo()"; } public function bob() { echo "This is A->bob()"; } } class B { private $foo; public function __construct(Foo $obj) { $this->foo = $obj; } } Using my example above, class B can happily call $this->foo->boo() & $this->foo->bob() and is guaranteed that those methods will exist.
  11. Pass it in via a method or constructor. In doing so however, you must insure that the object you are passing in implements an interface that the class being passed the object understands.
  12. Those examples do not help me. I told you the other day when you first asked for critique of your database class that I thought the idea was way off track. I still stick to that. I'm not sure I can be of more help here. The entire design is not something I would work with.
  13. If all the databases are on one server, you should use one connection and simply switch databases. I still think your database design sounds very suspect. Why do you think you need three different databases? How do you propose to execute join queries across these different databases?
  14. No, I meant using more than one database is a rarity. Seems to me your database design might also be floored.
  15. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=316549.0
  16. Whats the question / problem?
  17. You get what you pay for, hence, there is no such thing as a good free host. There is however a sticky on the subject of hosting here: http://www.phpfreaks.com/forums/miscellaneous/web-host-list/
  18. No. You would have a completely different Database object connected to each different database. Multiple databases are a rarity, and besides, using your method you would need to pass the name of the database you wanted to work with along with every query. 1 Database object should represent 1 database.
  19. There are a bunch of things wrong with this class design wise. 1) It should not be named User if its responsibility is to create new users, it should likely be named UserManager os similar. Class names ARE important. 2) It relies on constants defined outside of the class itself. This breaks encapsulation. 3) It relies on a database connection being opened outside of the class itself. This breaks encapsulation. 4) It relies on the mysql extension. This breaks encapsulation.
  20. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=316528.0
  21. I'd suggest you start by learning PHP. Your task will then be very simple. There's a good free book in my signature (Hudzilla).
  22. There is nothing syntactically wrong with your example. Mind telling us what the actual problem is?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.