Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Um, no. Specify "INT", and then UNSIGNED somewhere.
  2. Well, there's always Lucene... but I too have a custom weighted search, so FULLTEXT was never the right match.
  3. Great question... and no, mysql won't do this for you. There are a variety of ways to handle this -- it really depends how general a solution you want to implement.
  4. Sounds like you should first figure out how many lyrics per album, and then limit your query accordingly.
  5. Perhaps... I've not really used FULLTEXT much in production.
  6. fenway

    3 deep joins

    So start with MAC and left join the other two.
  7. I don't think it's the fulltext that's slow -- that's only returning a singlle record from that table, no?
  8. Then this is the wrong forum..... moving to php.
  9. fenway

    3 deep joins

    use a LEFT JOIN.
  10. DISTINCT is not a function -- it will only removes duplicates across the entire column list, not just the first field.
  11. I assume you mean you have a FULLTEXT across multiple columns....
  12. That's backwards... you need to select from the related_products table and then join products in twice.
  13. Why does everyone want to do this? This is NOT a counter. This is a unique row identifier -- never to be re-used. Oh, and you'll kick yourself later for using SMALLINT -- use UNSIGNED INT instead.
  14. in_array() is painfully slow, from what I've read. It would be easier to get all of the PINs (no need to sort), put them in a hash, and then run a while loop using rand() until there's no hash collision.
  15. There's a PERIOD function.
  16. Your sample output is confusing... i see matching records for everything.
  17. Well, REPLACE will still work...
  18. Yes, but each script is effectively a "session".
  19. Why select everything then merge it with a subset????
  20. Why do you have an UPDATE statement inside your INSERT?
  21. Then you would know to turn on error reporting....
  22. You're unfamiliar with sprintf(), but you're using it in your code? Now really.... BTW $forumQ had better be the query string, not the result set. $forumQ="SELECT topic_id, topic_title, topic_replies, topic_views, topic_last_post_id FROM phpbb_topics ORDER BY %s DESC LIMIT 20"; $array1Q = sprintf( $forumQ, 'topic_title' ); And then you can simply run this query.
  23. Well, then you'll just have to wait & see.
  24. You're not reading what I wrote -- a multi-column index. Yes, but you won't have 100 all of the time, and then you can keep track of when this happens.
×
×
  • 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.