Sum column values from two MySQL tables
Posted: 12 Jan 2017, 17:04
I have this database for my comments
Now i wanna count the comments from citem
& those counts from the c66u_nucleus_comment
i wanna place into my items
i think by this inumber
Now i wanna count the comments from citem
Code: Select all
c66u_nucleus_comment
Type Collatie Attributen
1 cnumber int(11)
2 cbody text
3 cuser varchar(40)
4 cmail varchar(100)
5 cemail varchar(100)
6 cmember int(11)
7 citem int(11)
8 ctime datetime
9 chost varchar(60)
10 cip varchar(15)
11 cblog int(11)
i wanna place into my items
i think by this inumber
Code: Select all
c66u_nucleus_item
Type Collatie Attributen
1 inumber int(11)
2 ititle varchar(160)
3 ibody mediumtext
4 imore mediumtext
5 iblog int(11)
6 iauthor int(11)
7 itime datetime
8 iclosed tinyint(2)
9 idraft tinyint(2)
10 ikarmapos int(11)
11 icat int(11)
12 ikarmaneg int(11)
13 iposted tinyint(2)