SQL query help

ruicosta

Regular Member
Joined
Nov 23, 2009
Messages
224
Reaction score
27
I need to transfer data from karma mod in phpbb to karma in smf.
Phpbb has a table phpbb_karma which is basically a karma log. Important fields we need to focus on are user_id (user which got the karma) and karma_action (positive or negative karma, shown as + or -).
I would need a query to count all the pluses and minuses and then copy the given results for each unique user_id into smf_members table under appropriate id_member (user_id field in smf) and karma_good (all the pluses) and karma_bad (all the minuses).
I think it can be done but I am not sql expert.
 
it should be like this..

INSERT into karma_good SELECT user_id from phpbb_karma where karma_action='+';
INSERT into karma_bad SELECT user_id from phpbb_karma where karma_action='-';
 
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002294531.htm...here you can get help to solve your problem...try it



small buddy
 
SQL is stand for the structure query language. This language is very interesting language. SQL is special type programming language. SQL is used the insert data form the data base and Deleted the Data from the Data Base. Sql can view the data base.
 
Back
Top