Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. You can simply count(*) or use the f table fields...
  2. You need to add this to your column list, not JOIN it in.
  3. Unlikely... besides, it's one per friend, not one per point.
  4. <SHUDDER> Use "- INTERVAL 20 MINUTE"... don't use PHP for date math. </SHUDDER>
  5. DATE_FORMAT() is your friend.
  6. fenway

    Query Help

    This is a double-post....topic locked.
  7. I wish I did... but I don't know anything about php functions. However, I'm sure I've seen the problem addressed before, you might want to search this forum.
  8. I see inserts with missing values.....
  9. What's "both"? Why not just drop the where clause?
  10. Add ( SELECT sum( dist * 0.485 ) AS mileagefee FROM `mileage` WHERE id = <the outer table id> and work_id = <the outer table work id ) ) AS mileageSum To the first query.
  11. That's because COUNT() doesn't count nulls... and the p table can be nullified by the left join...
  12. I'm not sure what you're trying to do.. way too much code, not enough explanation.
  13. Maybe... but the above won't work.
  14. I don't see how that's possible... missing quotes?
  15. What queries are you using?
  16. Life's been busy... I'll try and do this tonight.
  17. Don't do this... now you see why ti's bad.
  18. Add another table, called downloads... store the user id, the file id, and the date/time. Don't store delmited values in the database! You may want to read up on DB normalization, see the board stickies.
  19. fenway

    Exporting!

    You're running PHP on an intranet?
  20. The only annoyance is not posting said solution.
  21. You mean like this?
  22. In case anyone's wondering, it was the trailing comma....
  23. There are a bunch of stickes that cover intro topics like joins.
  24. Sounds like you need to join the table... though your syntax with AND is incorrect.
×
×
  • 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.