Jump to content

Frankie T

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Everything posted by Frankie T

  1. Thanks. It seems like, then, that it's just a matter of updating every single row. There's no easy way around it. Anyone else have an opinion?
  2. Hey all. I have what I think may be a fairly complex problem to solve, and I'm sure there are many solutions. I'd like your opinions. Here's the rundown. I'd like to create a "ladder" for a company table tennis league. This is how the ladder works: [*]Players are, at first, randomly assigned a rank [*]Players can challenge any player up to 5 ranks above them [*]If the higher-ranked player wins, nothing changes [*]If the lower-ranked player (the challenger) beats the higher-ranked player, the lower-ranked player takes the higher rank. The higher rank player drops down one rank To clarify, an example: [*]Molly (ranked 5) challenges James (ranked 3) [*]Molly wins the match [*]Molly is now ranked 3 [*]James is now ranked 4 How do I accomplish this? Should I store the ladder in its own table? Should I store players' ranks in their respective rows in the players table? Either way, I'll need to update every record in the table to reflect the new rankings. Is that a reasonable way of doing things? Is there a better way? Thanks, guys.
  3. Ah! Thank you so much! I didn't know about that function. What you told me allowed me to rule out what I thought it was. Turns out, there was just an error in my logic. Thanks again!
  4. Hey there, Pretty frustrated with this. It seems so simple, but I've been staring at it and toying with it for ages, so I figured I'd post here. I have a variable called "$isTaken" that seems to be losing its value in an essential step in my function. Take a look. function subdomainTaken($inputtedSubdomain) { //Initialize $isTaken to 'true' $isTaken = true; echo "isTaken STARTS AS: <i>" . $isTaken . "</i><br />"; //FOR TESTING PURPOSES ONLY. VARIABLE HAS VALUE HERE //Check subdomain in database $subdomainDBQuery = mysql_query("SELECT * FROM `companies` WHERE company_subdomain = '$inputtedSubdomain'"); $foundResult = mysql_num_rows($subdomainDBQuery); if ($foundResult > 0) { $isTaken = true; } else { $isTaken = false; } return $isTaken; } By the time I get to the if statement, $isTaken has no value. I've echoed it to be sure. Any ideas? Thanks, Frank
  5. Any place you could refer me to for more info? I've seen a lot of that all over the interwebs, but many great programmers are horrible communicators, and I can't seem to understand what specifically needs to be done based on their limited grasp on English. Thanks again.
  6. Bingo. Sorry for the confusion. That's exactly what I'm looking for. Would I need a dedicated hosting account to do what you've described?
  7. I imagine that the logos would all be in a single 'logos' folder. I'd then store the URL of the logo in the database and pull it as needed.
  8. Fair enough. Yes, every entry is being stored in a single database, and they do all have a client ID column. The layout for every client will be the same, with the exception of the logo, all of which will be stored in a single folder and renamed dynamically so that my application can easily pull them out. Does that sound like a reasonable approach?
  9. Maybe I'm missing something, but there really isn't any client-specific code in what I'm doing (I think). Every client will be using the same platform, the same code. Do I simply create the illusion of separation with SQL queries that get results only where client = theCorrectOne? If that's so, then how do I create subdomains dynamically without creating an actual folder for them?
  10. Thanks, Thorpe. Anyone else? I'm looking for something a bit more specific. Where should I be looking for help on a project like this? Any books/websites I could leverage for reference?
  11. Hey thar, New to the forums. I have a simple question with what I imagine to be a fairly complex answer. I'm creating a web application (software as a service, etc.) that will be used by many companies. I'd like these companies to be isolated from each other on the interface level, with each account living virtually in its own subdomain, but united in one database, sharing the same core platform that I'd only have to change in one place to affect all users, like WordPress.com for example. What kind of techniques might I use to achieve this? Thanks!
×
×
  • 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.