I have two tables in a database that looks like this
members table1
id | memberid | name | password
-------------------------------
Journal table2
id | memberid | title | desc
-----------------------------
i want to select all members from table one, joining with the result journal_count of each member in table 2. Am trying to count the number of times each memberid appears in table2
Am using mysql and php, can someone help me with this query
thanks
P.S. If your table has a field named desc, beware that this is a reserved word and it would be better to rename it. Otherwise you’ll always have to put it within backticks.