Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Nope.
  2. You can say s.read = s.read + 1, but that's not necessarily thread-safe.
  3. What does that mean?
  4. Check the EXPLAIN output of the equivalent select.
  5. When there's just one column it doesn't matter.
  6. You mean the TIMESTAMP column type?
  7. You should probably self-join this table, using the empID as the join condition, then limit t1 to in and t2 to out. I'm assuming there's only one per person, otherwise you'll have to limit 1 in a derived query.
  8. According to the refman page, you should have no problems...
  9. It's not a reserved keyword, so backticks won't make a difference. And double quotes are never valid syntax for name. AFAIK, it's either DEFAULT or a specified charset/collation, not both. Try dropping "DEFAULT".
  10. That's not the "relevant" code, that's all the code :-( Anyway, echo the query that you're using to check the credentials.
  11. Unless you ech your $query variable, you won't see it.
  12. Provided you want to update all the records the same way, yes.
  13. Echo $sql right before mysql_query().
  14. Yup... I prefer to wrap the entire on clause in parens just to be explicit.
  15. I'm not sure I know what you mean... you'll need to group the related options as they pertain to your DB structure (a simple prefix will make them easy to gather).
  16. I see... well, then a stored procedure (which can iterate) is probably best... but I'm not that versed in these matters.
  17. The posted code is using table prefixes/aliases in the where clause, but not in the select column list.
  18. 1) No, it's not necessary. 2) Post the query. 3) Yes, but it's generally a bad idea. 4) Yes.
  19. I prefer not to download files.... post the relevant code snippet with your insert statement.
  20. You have to wrap the entire thing in parens, then order by.
  21. I'm sorry, I still don't understand... if I make a typo. don't you want to include more results, not less?
  22. BETWEEN works too.
  23. Sorry, my bad... didn't see the list() there, thought you were referring to the column name, which has now been aliases to date.
  24. Actually, this sends the password in plaintext across a network, will show up in logs, etc... checking the password after is more robust and more secure. Echo the sql query.
  25. I'm not sure what you mean by "against itself". You can use a derived table and join it back to the orignal table... but you still have to decide how to programmtically describe "obviously very similar".
×
×
  • 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.