Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. There have been countless articles posted on how these and other sites design their databases... but why worry about their problems?
  2. In general, you would try to put your field value outside the "between", so that an index could be used...
  3. That's not echoing the query to the screen... that's copying and pasting php code, which I've already seen. It doesn't help me. Store that query in a variable, and echo that variable to the screen, then post it here -- just the sql, not the php.
  4. There's nothing "wrong" with these characters, and you may or may not want to permit them for your own reasons. But it has nothing to do with mysql, as long as you espape them, they are treated just like normal characters. You can't tell someone whose last name is O'Brien to change their last name.
  5. We don't need all of that code... echo the insert query to the screen.
  6. Yes, fake the other columns: SELECT profileID, details1, details2, details3 FORM linkRel where profileID='0' UNION SELECT profileID, details1, details2, NULL AS details3 FROM metaTag where profileID='0' UNION SELECT profileID, details1, NULL AS details2, NULL AS details3 FROM pageTitle where profileID='0' ?
  7. No need for PM... just make sure you escape special characters with mysql_escape_string().
  8. That's right, don't escape your alias!
  9. Where you put the column usually has little to do with optimization, but rather normalization.
  10. For UIDs, use INT UNSIGNED. For everything else, choose unsigned intelligently. Forget about speed, it makes no difference.
  11. Not sure what you mean... you already have the data from the db...
  12. Depends on how big they are, how much/often you're serving, etc...
  13. You can "convert" a multi-table select into a multi-table update...
  14. Yikes... can't you collate it "down" without have to do all those replaces..? Still we have to narrow down the column that's the problem, and I don't see collation info.
  15. I'm very confused... do you need all of this data back all of the time?
  16. Too few records also causes problems.
  17. Full-text queries behave like that sometimes, especially if there are too many results.
×
×
  • 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.