Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Just increment a counter whenever thye sign in.
  2. What do you get now?
  3. First, you can do all of that in single query -- second, why not COUNT()?
  4. Missing a semi-colon to end the statement after the first create table.
  5. Actually, they would be equivalent, no?
  6. I think you mean SUM()...
  7. Perhaps not... but the sample UPDATE code you provided is very confusing.
  8. Please stop asking people to post their code -- we don't need to see their ENTIRE code! Just a single query. his query probably[hopefully] is structured correctly. The issue is probably with how he has manipulated the variables, and not added slashes and such. Just seeing the query itself wont help much Which is why I asked to see the QUERY, not the PHP CODE! Please echo that query string and post it here... I don't need code, mysql doesn't have any.
  9. Well, you're not getting back jos_content.id...
  10. This doesn't sound like a mysql issue at all....
  11. That's from mysql_error(). Do this: echo "INSERT INTO Account (username, password, email, status, rank) VALUES ('$newusername', '$md5password', '$newemail', '0', '1')"; But it looks like there is a quoting issue.
  12. That's PHP code... I want to see the actual statement... echo that string. And check mysql_error() afterwards.
  13. Please stop asking people to post their code -- we don't need to see their ENTIRE code! Just a single query.
  14. I'm not looking anywhere else but this topic for code. Perhaps posting the mysql query you're issuing to the server when it fails, along with the error message, would help.
  15. Why won't a join work?
  16. You'll need to boil that down to simple terms for anyone to make any sense of it.
  17. You can use command-line parameters in mysql statements. You need to start the CLI that way.
  18. Change dynamically? What does that mean?
  19. You should be able to use INSERT... ON DUPLICATE KEY update, since you can pass it a select statement for the values... never tried this, through.
  20. Why have 2 fields if they're always going to be the same? I'm confused.
  21. That's not a nutshell... I see lots of queries.
  22. Well, it's no different than the above.
  23. If you normalized your data then, not only would the queries be simpler with a single date pair instead of four, but you'd be free of the null/0000-00-00 problem. Yeah, that too.
  24. Compare to each other? To a single table?
  25. Post the EXPLAIN for your SELECT statement and I'll tell you.
×
×
  • 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.