Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. That means you're successfully logged in to the mysql client...
  2. Oh, it's impossible -- don't even begin to try. You don't need this number.
  3. And there's nothing wrong with a subselect to get the total count for everything - super easy.
  4. then "locate" mysql and run it from there.
  5. Great -- so what's the error?
  6. Sorry, I don't see a question.
  7. Show us some sample output -- I don't know what "not works" means.
  8. CSV doesn't "support" anything -- it's just a bunch of commas. And if Excel doesn't produce UTF-8 output, then that's the root of your problems.
  9. I don't understand -- do you want it to match for BOTH name1 and name2, or EITHER name1 or name2?
  10. That's because you can't use a non-aggregated column value and expect it to mean anything. Why not simply filter them out in the WHERE clause?
  11. TLDR -- what exactly are you trying to do?
  12. Time to chime in here -- "testing" new ads on a live production site with absolutely no heads-up (to the community, not the staff, mind you) is simply bad for business. Yes, I know the staff is privy to recent strife, but that's not my point. We'd all like to see this community generate more revenue -- that's part of what the strife was related to -- and ads are just about the only way to do that. I agree that non-registered visitors should be shown lots and lots of ads -- but relevant, unobtrusive ones can be shown the logged in users as well. I find it really hard to believe that a billion-dollar industry can't deliver appropriate content. If PHPFreaks is serious about trying this out, let's set up a private area when staff (and other such beta-testers) can provide feedback on just how broken things are when the ads are running, and take it from there. Flipping switches on & off just strikes me as the wrong approach.
  13. There are some magical ways to build "queues" into a MySQL table, but I doubt you really want them.
  14. That's overkill for an intro -- SQL Antipatterns is a good introductions on what not to do.
  15. That's because there's never an need to do so. What are you trying to accomplish?
  16. Why not search everything and simply adjust the weights?
  17. What's a LineString?
  18. Assuming you can't travel in time, why not only select those rows that don't match today's date?
  19. What rules are you using to make this determination?
  20. SELECT `rmnd_main`.`users`.*, `rmnd_main`.`users`.`id` AS uid FROM `rmnd_main`.`users` WHERE `rmnd_main`.`users`.`password` = 'PASS' AND ( EXISTS (SELECT * FROM `rmnd_main`.`phones` WHERE `user_id` = uid AND `number` = 1234567890) OR EXISTS (SELECT * FROM `rmnd_main`.`emails` WHERE `user_id` = uid AND `email` = 1234567890) ) Of course, you shouldn't be sending passwords in plain-text across the network.
  21. That's because those sub-queries are being run "first", and aren't correlated. What you actually want to use is "EXISTS".
  22. Not sure how you can lose rows with a left join...
  23. You have no choice -- you need 10 of each to get 10 combined & sorted correctly. Don't worry about it.
  24. There's no possible way that a UNION of 10 + 10 with an outer limit of 10 can't return 10 records.
  25. fenway

    COUNT query

    Clearly, I'm lost.
×
×
  • 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.