Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. fenway

    Find in set

    That's over kill -- and isn't really doing what it says it's doing. Oh -- just run find in set twice.
  2. That's not really the kind of moderation we're here to do. It's not that I don't agree with you, I just don't think these forums are the best place.
  3. Consultants have professional opinions -- not every client is going to understand every nuance of technical decision. Granted, it helps to try and explain it, but not always. If the client didn't need any help, they wouldn't have hired a consultant. They hired an expert, so they should treat the opinion as expert as well. Clients DO NOT understand anything about hosting -- don't fool yourself. No technical decision should ever be left to the client -- that's just irresponsible. Besides, why would you ever limit your recommendations?
  4. If you switch to INNER JOIN, it might be much faster, depending on the number of rows in each table.
  5. You need to wrap the MAX() call if IFNULL(), not the case.
  6. What error did you get from mysql_query()?
  7. I can't help you anymore -- you're not supplying the required information -- maybe someone who speaks Romanian can.
  8. Well, why the LEFT JOIN -- you're not checking IS NULL anywhere. Also, if you're using LIMIT 30, why give the server 250K IDs?
  9. Still -- no error provided.
  10. My guess? The delimiter. But if you dumped the error, you might know.
  11. Actually, that's the consultant's job -- the client has no idea what they need, nor what they want.
  12. Agreed -- if you can't ensure that your client's servers are up to par, then you shouldn't even bother.
  13. Personally, I find it frustrating to work towards a solution, only to find out that the OP has gone elsewhere (i.e. devshed) as well. Why should I bother helping you if you're just going to get someone else to as well? I might as well wait until they give up. In terms of the solution, you'll notice that userID isn't one of the columns returned from that subquery.
  14. The freelance board is a convenience -- we're not going to step and decide who's opinion is correct. I'd sooner dump the freelance board entirely. Besides, you can always create a topic to ask.
  15. First, I really dislike when topics are posted on different web-site forums -- seems like a waste of everyone's time. Second, that solution will not work if you ever wanted to test for 2 different userIDs.
  16. First, you haven't listed the column names -- that's a no-no. Second, you're quoting 'null' -- guaranteed that's not what you mean. Third, as suggested, echo the actual query, since what you describe is impossible.
  17. This will NOT work at all. userID can't be 3 things at once. I didn't really Muddy suggested that -- it's a common misconception. This, OTOH, will work: SELECT t1.`group_Id` FROM `myGroupTable` AS t1 CROSS JOIN `myGroupTable` AS t2 CROSS JOIN `myGroupTable` AS t3 WHERE t1.`user_Id` = 3 AND t2.`user_Id` = 7 AND t3.`user_Id` = 100 It's more efficient, too.
  18. And this is precisely why I insist that all my clients are hosting on my servers.
  19. Why can't you just fix this after the query runs? If NULL is always 0, that should be easy. If you want me to actually run that crazy query, you'll need to provide the raw queries to make the tables and populate them with your data.
  20. Sorry, missed that -- if this is a read-only situation, you can probably used FEDERATED tables to cheat.
  21. That's a really long query -- impossible to debug without data.
  22. Oh -- if you want all 3 to match, then you'll need to JOIN, one for each value.
  23. If they're on the same server, you can create a user that has access to both.
  24. You're missing a close paren for the ON close.
  25. And you can use arithmetic if you really want.
×
×
  • 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.