Insert data from two table into another I'm trying to generate and insert data from two tables in new one. 
I should take all data from M table where Type is 1 and all C data where type is also 1 and add it as shown in result

Sample of data:

M table:

+----+------+------+
| Id | Name | Type |
+----+------+------+
| 1  | M1   | 1    |
+----+------+------+
| 2  | M2   | 1    |
+----+------+------+
| 3  | M3   | 1    |
+----+------+------+
| 4  | M4   | 2    |
+----+------+------+


C table:

+----+------+------+
| Id | Name | Type |
+----+------+------+
| 1  | C1   | 1    |
+----+------+------+
| 2  | C2   | 1    |
+----+------+------+
| 3  | C3   | 2    |
+----+------+------+
| 4  | C4   | 2    |
+----+------+------+


Result:

+----+---+---+
| Id | C | M |
+----+---+---+
| 1  | 1 | 1 |
+----+---+---+
| 2  | 1 | 2 |
+----+---+---+
| 3  | 1 | 3 |
+----+---+---+
| 4  | 2 | 1 |
+----+---+---+
| 5  | 2 | 2 |
+----+---+---+
| 6  | 2 | 3 |
+----+---+---+
Select any variant of

    INSERT INTO c (c, m)
    SELECT c.id, m.id
    FROM c, m
    WHERE c.type = 1
      AND m.type = 1


    INSERT INTO c (c, m)
    SELECT c.id, m.id
    FROM c
    JOIN m ON m.type = 1
    WHERE c.type = 1


    INSERT INTO c (c, m)
    SELECT c.id, m.id
    FROM c
    JOIN m ON c.type = 1
    WHERE m.type = 1


    INSERT INTO c (c, m)
    SELECT c.id, m.id
    FROM c
    JOIN m ON m.type = 1
          AND c.type = 1


    INSERT INTO c (c, m)
    SELECT c.id, m.id
    FROM c
    JOIN m /* ON 1 = 1 */
    WHERE c.type = 1
      AND m.type = 1