Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Show us the query, and the output.
  2. Usually the DB interface class exposes some sort of quote() function... depends on how you're connecting.
  3. What's the perfomance of that subquery alone? And why all of hte left JOINs?
  4. With IS NULL and LEFT JOIN, you'll only get the rows without matches in the other table.
  5. Is this homework?
  6. Nope -- that's just a regex call.
  7. That's not an option -- just list the column names -- what's the problem?
  8. Removing tags, html entities, UTF-8 characters, slashes and non-email characters won't help you in you haven't escaped SQL metacharacters.
  9. Your table name looks single-quoted, not in backticks.
  10. fenway

    MYSQL Error

    And you're missing a WHERE clause.
  11. Show us the EXPLAIN output.
  12. You can't overcome that easily -- the apostrophe is considered a non-word character, so the index stores "ronnie" and "s" -- and throws out "s" because it's too short. "Ronnies" is a different word entirely. If you want these to be the same, you'll need to strip out apostrophes from the column you're searching -- or, alternatively, store a "cleaned" column value instead, and search this. This is commonplace, since you often need to strip out HTML, too.
  13. I'm not sure I'm clear on what you're trying to do -- you want the IDs as the values/
  14. If you want row-based access restrictions, youl'll need a VIEW.
  15. MATCH() ... AGAINST() won't help you with "red" and "car' -- the default stopword length is 4.
  16. XML is markup language -- I don't understand the question. That's like asking on HTML can connect to a DB.
  17. I agree with you -- but you're trying to UPDATE it in advance.
  18. You need another table of cateorgies, and another of questions.
  19. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=317387.0
  20. update yourTable AS t1 SET t1.newField = ( SELECT ID FROM yourTable WHERE name = t1.name )
  21. Or add a "sortorder" column.
  22. Great. Now, back to your question -- which code snippet are we talking about/
  23. Well, then it should be pretty straightforward -- assuming each name has only a single ID, and vice versa. Add new columns called animal_id, theme_id, etc. to the appropriate tables -- these will ultimately replace the name lookups. Then simply issue an update to each table, and use a subquery to pull back the ID for each given name. Then you can drop the other columns -- once you've updated your application code, foreign keys, etc.
  24. You can't use GROUP BY and those title fields together.
  25. I'm guessing it's a delimeter issue.
×
×
  • 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.