Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Easiest way is to convert this into a select with proper join syntax first, then convert to either of the valid delete syntaxes.
  2. fenway

    Highest 10

    Just run a query, get MAX(score), GROUP BY user_id, ORDER BY score DESC LIMIT 10.
  3. Not to mention that there's no column called 'f_id'. And expecting a solution in 2 hours in unreasonable.
  4. Other than the trailing semicolon in the query that shouldn't be there, this is clearly a DB class. How do you know you're getting any rows back?
  5. NULL options? You mean rows or fields?
  6. Agreed... I believe this may have been spawned by my post to another thread.
  7. In 5.0, you can roll your own text parser and use it for fulltext searching. Otherwise, it's tricky.
  8. Drop the where clause -- switch to count(*). Assuming you get back non-zero, start adding it back piece by piece.
  9. See here -- sounds like to have to fix the FK issue first.
  10. You have the wrong password. Or you're connecting from a new/different host.
  11. It's much better to use JOIN -- no issues with comma precedence changes, no missing join conditions, clear where clauses for filtering only, etc. Also, makes it trivial to switch join type (inner vs left) in a second.
  12. Sure... don't use integers, or prefix them with underscores.
  13. The details of the attack aren't relevant... suffice it to say that it took some very skilled admins a while to figure out.
  14. MySQL can do wildcard searches... but it's not appropriate here.
  15. That's quirky because you're using integers as hash keys... associative array in JS are funny.
  16. MySQL doesn't have "lists". Yes, that too....
  17. "Implicitly" is precisely the problem: SELECT * FROM Saved_product AS sp INNER JOIN profiles AS p ON ( p.email = sp.email ) INNER JOIN ordered_products AS op ON ( sp.ProductID = op.ProductID ) WHERE sp.ProductID = 1111002 This will keep you out of trouble.
  18. Include ones with those lastnames?
  19. I assume you meant count(*) in your code snippet.
  20. No problem... keep watching that EXPLAIN. There are a few stickies on this issue that I've posted.
  21. What's wrong with "delete"?
  22. I see lots of NULLs for key usage! No indexes... Add an index to items.realid and completed.userid
  23. IN() works with comma delimited strings.
  24. Could we see the EXPLAIN too?
  25. A derived table IS NOT a subquery in the traditional sense, since it's uncorrelated.
×
×
  • 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.