Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Does your table have multiple columns for each question/answer?
  2. Yeah, but that's in an SP.
  3. The information must be here.
  4. Sorry, I didn't forget, I'm just swamped.
  5. Yeah, for optimizations afterwards.
  6. Why not simply: SELECT SUM( CASE WHEN user_id = 1 THEN 1 ELSE WHEN friend_id = 1 ELSE 0 END ) as friendCount FROM partners WHERE user_uid = 1 or friend_id = 1
  7. Que_Choice1 Que_Choice2 Que_Chocie3 Que_Choice4 That's repeated 4 times.
  8. That's just not a great DB design -- not normalized at all.
  9. fenway

    Select

    Yeah, but the IDs are arbitrary, and if I insert something for the past or the future, the id is meaningless.
  10. Great -- now tell us what it was.
  11. But that's the most inefficient query you could possibly write.
  12. Echo mysql_error().
  13. Oh, same here -- I can't possibly do it any differently at this point.
  14. Actually, INTO has always been optional -- regardless of syntax.
  15. If you'll post your CREATE TABLE statments, and some sample data as INSERTs, then I can give you a working query.
  16. There's always the PHP refman.
  17. Well, since you're getting a real error, and not a dummy one, tell us what's actually going on.
  18. Then check mysql_error() and see why.
  19. Actually, with the word SET, it would actually work ... alternate syntax... though it's evil.
  20. Making changes to HTML templates hiding in an DB is just hard for no reason. There are countless examples of using that quoting function on this forum.
  21. What's col3.col4? That doesn't make any sense.
  22. fenway

    Select

    Yeah, don't use id for this kind of thing -- a timestamp is the only useful column in this case.
  23. ALL PRIVILEGES is usually a bad idea -- public users don't need alter, drop, etc.
  24. I didn't understand a word of that. Are you ever searching by anything other than d_id?
  25. fenway

    while loop

    Where's the mysql question?
×
×
  • 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.