DISQUS

Building Browsergames: Building Browsergames: DRYing out our database connections (PHP)

  • MrLollige · 7 months ago
    Right now, you do not need the config file for anything else but database values.. Right?

    So why not make the config and the database connection file the same file?
  • Luke · 7 months ago
    That sounds like a pretty good idea - the tutorial's finished, but I'll
    definitely have to keep that in mind for next time.
  • MrLollige · 7 months ago
    I am just checking if my own ideas are not silly or if I am forgetting something. But of course, you can use them ;)
  • BBBB · 6 months ago
    I don't think you really should do this. Later there will be much more values in it and you dont want to connect to mysql always when you include the file. Also I would start searching in the config for the mysql config and not in the database file