doberlec
06-10-2004, 10:58 AM
Hi folks,
I have a problem in reading out the users postcount, multiply this with a given value and add it to another table. Here is the desciption of the things I need to do:
https://vborg.vbsupport.ru/showpost.php?p=521161&postcount=323
- read each user info
- count number of posts per user
- multiply the number of posts times 25 ( if this is the amount of money you are giving )
- read the current amount of money at the bank account of each user
- add these numbers
- store the new result in the bank account
The big problem is that the structure of the two tables is not identical. After some trying I realised that I didn't need to copy the data into another table as user table has also a 'money' column. What I am now trying to do is reading out people's post count and multiply this with e.g. 25 and then write this value into the 'money' column of the same table. However as I am not as good in mysql as you guys, I wasn't able to do that yet. :/ I hope someone could shed some light on this problem =) I hope someone could post a query which does that little trick :)
TIA,
-d
I have a problem in reading out the users postcount, multiply this with a given value and add it to another table. Here is the desciption of the things I need to do:
https://vborg.vbsupport.ru/showpost.php?p=521161&postcount=323
- read each user info
- count number of posts per user
- multiply the number of posts times 25 ( if this is the amount of money you are giving )
- read the current amount of money at the bank account of each user
- add these numbers
- store the new result in the bank account
The big problem is that the structure of the two tables is not identical. After some trying I realised that I didn't need to copy the data into another table as user table has also a 'money' column. What I am now trying to do is reading out people's post count and multiply this with e.g. 25 and then write this value into the 'money' column of the same table. However as I am not as good in mysql as you guys, I wasn't able to do that yet. :/ I hope someone could shed some light on this problem =) I hope someone could post a query which does that little trick :)
TIA,
-d