Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Your table is "visinfo" -- you can put in into any table you'd like.
  2. This would be step one.... select t.test_name ,f.feature_name ,t2f.feature_value from test2feature as t2f inner join test as t on ( t.testid = t2f.testid ) inner join testfeature as t2 on ( tf.featureid = t2f.featureid ) But your query can't be psychic -- it needs to know that there are 2 (or N) feature names in advance... very difficult to do dynamically in a single query.
  3. I won't even ask what you're trying to do... but the issue is that you're not appending to your strings.
  4. wb... What's wrong with: Select cheese, beans, (footballs - rabbits) as result FROM beans WHERE (footballs - rabbits) = 0
  5. From what to what? And I still don't see the echo'd version of that query string.
  6. Does this "check input function" add quotes? Where did the come from? If it was from user input, I assume you have a sql quoting function that handles this....
  7. Depends what EXPLAIN says.... but that's not really how you're supposed to look up things within a given radius... there is an entire set of spatial functions for this.
  8. Not always... it's something the optimizer should do, but doesn't.
  9. To utilize an index, you need it in the form: SELECT * FROM table WHERE column1 BETWEEN expr1 AND expr2 So you have to move it around so one of the columns in being compared against the expressions (which can also contains column references). Sometimes this means you have to add a 2nd part to the where clause. So SELECT * FROM table WHERE startDate >= NOW() and endDate < NOW() Is "better", though it does obscure the logic a bit. check EXPAIN.
  10. Solution?
  11. 60K records can easily be housed in a single table...
  12. Back up how/where?
  13. Um, no... that's impossible to maintain.
  14. That's not a very clear description of the database you want to design... try being more specific.
  15. You shouldn't store arrays in a single DB field.
  16. You're missing "DESC".
  17. Excep this won't utilize any index on start/end.....
  18. Then: SELECT friendid FROM members AS m LEFT JOIN added AS a ON (a.theirs = m.friendid AND a.yours='$friendid' ) WHERE a.theirs IS NULL
  19. If there's a 1-to-1 mapping btween the IDs, it should be easy
  20. I would have used a scrollbar....
  21. It's someone else's tutorial, right? They would know best. My guess is that it's posting twice.
  22. Which one?
  23. So the error WAS with the query -- amongst other things.
  24. Are those two single quotes together or a double quote? Either way, make it singles.
  25. Is this really across two databases? Why only 1 row matching in tables 2 and 3?
×
×
  • 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.