Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. fenway

    Tricky Query

    Display issues should be handled at the php level.
  2. Just remember that NOT IN is poor for index usage... better to LEFT JOIN with IS NULL.
  3. Loops? That would just be a simple join... but I don't see the "MAX" in your code.
  4. I don't think so... I can' default an INT to 6 without the field being NULL-able.
  5. Maybe I've misunderstood your "pointing to another domain". Could you give some URL examples?
  6. It's never supposed to re-use UIDs... and it never should... and neither should you. You shouldn't be using these values for anything meaningful in your application -- if you are, you've made a mistake.
  7. Are those unix_timestamps? If so, there's a FROM_UNIXTIME() function that will give you a proper SQL date, and then you can check MONTHNAME().
  8. You''ll have to either update the client or the server.
  9. Why not simply check the value of senderid using an IF() ,and null them out yourself?
  10. Very strange... really, a syntax error? I was guessing unsupported subqueries... you sure it's v5? I suppose you could re-write it as a join: SELECT * FROM lunch_loc AS t1 INNER JOIN ( SELECT MIN(tally) AS mintally FROM lunch_loc ) AS t2 ON ( t2.mintally = t1.tally )
  11. Well, it's not that simple anymore, is it? You won't be able to do what you want.
  12. That's a good start... which query? And please echo the plaintext sql statement, NOT php code.
  13. I didn't read this carefully, but it sounds like the standard groupwise maximum problem... you need to do this in 2 steps.
  14. If you pick a reasonably sized varchar, you can keep it in the same table...
  15. I think you have to put default after NULL/NOT NULL...
  16. I would address this at the DNS level.
  17. Well, first, I don't think you need 65K either... but TEXT automatically requires the use of temporary tables (i.e. written to disk), so that makes everything disk-bound and quite slow.
  18. That statement would work from the command line... so it's a quoting issue with php... my guess is that you're using single quotes for the entire query literal?
  19. You're storing the ingredients as a list in a single field. Database don't like that.
  20. It's because TEXT fields behave very differently than {VAR}CHAR fields. Do you really need more than 65K message?
  21. That's not helpful. What sql statement doesn't work?
  22. Syntax error? Waht version?
  23. No you can't... or rather, you shouldn't.
  24. You mean: $result = mysql_query("SELECT * FROM email WHERE printer LIKE '%$printer%' AND time BETWEEN '$date' AND '$todate'"); The "AND" was missing for BETWEEN, and you had two where clauses.
×
×
  • 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.