Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. What's wrong with: SELECT * FROM tablename WHERE REPLACE( fieldname, "'", "") LIKE '%$string%
  2. At the 2008 MySQL Conference and Expo, The Pythian Group gave away EXPLAIN cheatsheets (PDF).
  3. Could you give me an example? Loops and sql don't mix.
  4. Well, if you're trying to show an image in an HTML e-mail, then you need to use a SRC tag somewhere, which means you have to issue a request to this image with a URI, which means it likely starts with http.
  5. Sounds like you need a three-table JOIN; just guessing which fields you want... SELECT a.artist from ratings as r INNER JOIN tracks_tbl as t ON ( t.song_id = r.song_id ) INNER JOIN artist_tbl AS a ON ( a.artist = t.artist ) where r.user_id = $USerID AND GenreID=$genreID
  6. You need a serve script that (obviously) has access to this path, and then streams binary data...
  7. Or you can simply replace all the apostrophes with blanks on either end.
  8. You can try to use SELECT ... FOR UPDATE... see this.
  9. You can leave out the word natural, it doesn't do anything in this context.
  10. Definitely VARCHAR... using TEXT fields causes all sorts of issues for GROUP BY, temporary tables, etc... if 65K is enough go with it. Only reason to use TEXT before v5 was that varchar was limited to 255 characters ;-(
  11. Um, yeah... a few things: 1) you really shouldn't be using tinyint for an auto-increment column. 2) you really shouldn't be using those values as column names. 3) to get it to import, you need to enclose any field name with spaces in backticks (like `this`).
  12. This resource covers a very broad range of topics... it's worth a look, though, especially if you're stumbling in the early stages of configuration.
  13. Well, we'll need to see the entire statement.
  14. What I don't understand is why you have to put all of this in the same table.
  15. If you're using v5+, VARCHAR can store up to 65K.. to my knowledge, only the GIS stuff isn't compatible with MyISAM.
  16. There are some excellent resources in the stickies.. but those are more mysql focused. Hmm... no need to double-post.
  17. My guess is that it's your client (i.e. PHP) that has a problem, not mysql. Try adding the CLIENT_MULTI_STATEMENTS flag to your call to mysql_real_connect() and see if it fixes the problem.
  18. And a sticky in the child forum, too.
  19. There's nothing special about any DB "image"... once you extract the binary data, you can stream it out.
  20. For example: select pid, pname, sum(price) from products left join orderdetails using (PID ) group by pid, pname;
  21. Now I'm confused... do you mean TEXT? FULLTEXT is an index type, not a column type.
  22. Why do you want to do this?
  23. You've joined it correctly... not sure why you were expecting the second set of results.
  24. Why would it only find one?
  25. What are my options then? Am I stuck with myisam if I want to store a lot of characters? Store? Don't you mean search?
×
×
  • 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.