Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. IN() is just basically shorthand for a series of OR comparisons -- which explains why it doesn't work with NULL.
  2. That's just poor data storage design -- there is no simple facility for handling this is the data are stored that way.
  3. SELECT * FROM TABLE INNER JOIN TABLE AS TABLE2 ON ( TABLE2.id = TABLE.fid ) WHERE TABLE.id='$page' or TABLE.link_to_spouse='$page' or TABLE.fid= '$page' Of course, you'll need to decide which fields you want, and if there's always a non-NULL & matching fid or not. Also, don't use "table" as your table name.
  4. There are some excellent sticky resources on storing hierarchical data -- but use LEFT JOIN instead of RIGHT JOIN, it's the more common variant.
  5. fenway

    mysql recover

    Do you have backups/logs/etc?
  6. No, you shouldn't -- but DISTINCT * is meaningless. In fact, don't ever use DISTINCT -- you'll thank me later.
  7. Don't corrupt the raw data with an arbitrary number of zeroes.
  8. The fid links back to the same table? Then self-join
  9. You're talking about displaying results, not retrieving results -- that's php, not mysql.
  10. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=306136.0
  11. So only == 0 is different?
  12. Then you'd need a left join.
  13. That's not particularly efficient -- a cross join, one for each condition, would be preferable.
  14. That's because you're using a left join -- you need it in the ON clause.
  15. Yes, why not UNION?
  16. maybe with mysql_error() you'd get some useful information.
  17. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=305884.0
  18. You'll have to sort the field into two parts -- not efficient at all -- but possible. EDIT: just missed the post post by 2 seconds.
  19. I don't see your hoofdfoto restriction -- but you'll have to do this in two parts. Add that restriction to your where clause, and then if that's null, you'll have to get the "overall" max value.
  20. Sync how?
  21. fenway

    No Results

    That means your tmpdir is full.
  22. Even more so, the actual length a given row.
  23. They look like backticks.
  24. Show us the EXPLAIN output.
  25. Posting date is not possibly sufficient to relate a single question to a single answer -- try again.
×
×
  • 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.