Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Oh, you should defintely convert them all... STR_TO_DATE() makes it easy.
  2. Maybe you can explain what you want again... I'm not sure from the above what went wrong.
  3. Modify the table how?
  4. Not sure... I don't remember how the files are locked... but in principle, you may get inconsistent tables. A simple LOCK should remedy this.
  5. I guess the solved mod needs to be added back as well.
  6. I would go with option (1).. with some care, it shouldn't affect live data.
  7. Just like any other index, it has to be updated, takes up space, etc.
  8. First question: possibly, using a stored procedure with the information schema tables. Second question: you can have as many db handles as you want.
  9. MySQL has a TRIM() command, too.
  10. Errors? You simply query to see if there is a table with that name... no different than any other "count".
  11. Works for MyISAM... but make sure the tables aren't being accessed.
  12. Drop the database prefix.
  13. I see no escaping.
  14. IN() clauses are basically ORs... in 4.1, no index will be used; in 5.0, I believe index_merged solves this.
  15. I'm not versed in php... I'd imagine that you can do this once per connection.
  16. By all means... but I like to debug these things by testing the boolean output of each condition independently.
  17. Interesting... I ran these statements on 4.1 (though not all of the server mode stuff), and it was fine.
  18. I meant it's bad form to put *any* password on the command line. I also didn't completely understand that it was the table names that had funky characters. If you try and run these commands from phpmyadmin/CLI, what happens? Same thing?
  19. That's not so simple... because there's no way to know how many ratings you'll need before you can get 8 distinct companies... you'd have to drop the limit 8, order by company_id, use a user variable to keep track of when it changes, then filter with having... and then ultimately limit in your php app.
  20. Well, I can't see it... but it's solved now? How?
  21. Hmm... shouldn't be an issue if you're dumping SQL only.... could you post some of the output from the dump initially, without any options? Also, I hope you're not putting your password on the command line like that, it will end up in log files!
  22. If I understand correctly, you don't want the top 8 rated items, you want a total of 8, but from 8 different companies?
  23. First, echo the $sql variable, let's make sure it makes sense. Second, that's a PHP question... I have no idea.
  24. If that's the case, you'll need to grab the distinct list of companies and join that it as well.
  25. It's been a while since I've dealt with mysqldump, don't have access to my scripts, but yes, you need to specify the same set for in/out operations; check the refman page.
×
×
  • 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.