MySQL Forums
Forum List  »  Newbie

Re: UPDATE a field SEVERAL times in 1 UPDATE
Posted by: Chad Bourque
Date: August 19, 2010 11:35AM

Well, you didn't quite follow the instructions, but it is enough information to raise other questions.

What does this table represent?

Why aren't fills set to one after they are accounted for in trans?

I was right in that your tables aren't normalized. You are storing calculated data. I can't really say how best to design your tables since I can't tell what the data is or what it means or what you are doing with it. In general, relationships are kept in a separate table with one row for each relationship. Then, to know how many relationships there are for a given user, just count the rows in that relationship table for that user.

HTH,
Chad

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.