Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Please stop posting all of the code over & over again... this is a one-line query issue. You need to limit your query to refer to member_id -- I assume you know who is logged in? $query = "select surveys.id, survey.title, survey.adlink from survey left join completed_surveys on ( survey.id = completed_surveys.survey_id AND completed_surveys.member_id = <the-logged-in-user-id> ) WHERE completed_surveys.survey_id IS NULL ";
  2. The non-joined table will never have null values as the result of a left join -- try $query = "select surveys.id, survey.title, survey.adlink from survey left join completed_surveys on ( survey.id = completed_surveys.survey_id ) WHERE completed_surveys.survey_id IS NULL ";
  3. I was under the impression that addslashes() on binary data would work.
  4. I'm confused... if you don't want duplicates, why not have the DB handle this for you?
  5. Please don't fork new topics when the problem has generated 3 pages worth of responses! Sounds like you're in the wrong DB, DB not selected, etc.
  6. Zero? Why not use NULL as intended?
  7. If you manually fix the ones that have extra spaces, you'll be able to handle it easily.
  8. You can even do this in mysql if you are *certain* there's only ever a single space with SUBSTRING_INDEX().
  9. Seems like you really want the power of full-text indexing... have you looked at Sphinx or Lucene?
  10. Don't switch them... make 2 separate fields!!!!!!!
  11. That would be the better way, with mysql_result($asdf, 0, 0).
  12. How about this thread?
  13. I don't know what you're getting at.
  14. You would run this query: select table2.id, table2.name from table2 left join table1 on ( table1.id = table2.id ) WHERE table1.id IS NULL
  15. A left join would work too.
  16. You can't count words within a field without a custom function...
  17. You could just add a unique index and filter them that way.
  18. You need to use mysql_real_escape_string()... and you wouldn't need to quote your strings if you used single quotes inside.
  19. This is not really a mysql issue anymore....
  20. Dreamweaver produces hideous code. There are plenty of tutorials on this site that will point you in the correct direction.
  21. Do what? Storing strings in a db isn't an issue.
  22. Sounds like UTF-8 isn't properly enabled.
  23. Your feeling is correct: SELECT clubs.name FROM users_clubs INNER JOIN clubs ON ( clubs.id = users_clubs.club_id ) WHERE users_clubs.user_id = '$userid'
  24. I'm sure this has been covered at least a handful of times on this forum... search "harder"... it's buried here somewhere.
  25. Why is your form making the table?
×
×
  • 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.