simple mysqli join query not working
<p>I have two tables like this:</p>

<p><strong>subject_descriptors</strong>
descriptor_id, subject_id, grades, descriptor</p>

<p>which has data rows like this:</p>

<pre><code>1, 5, p2, some text
2, 5, p3, some more text
</code></pre>

<p>and</p>

<p><strong>subject_list</strong>
subject_id, subject</p>

<p>which has rows of data like this</p>

<pre><code>5, science
6, french
</code></pre>

<p>so as you can see a subject can have different grades/text</p>

<p>I want to create a query which gives me:</p>

<p>subject, grades, descriptor</p>

<p>something like:</p>

<pre><code>science, p2, some text
science, p3, some more text
</code></pre>

<p>I have tried unsuccessfully various joins like this:</p>

<pre><code>SELECT subject_list.subject, subject_descriptors.grades 
FROM subject_list, subject_descriptors 
WHERE subject_list.subject_id = subject_descriptors.subject_id
</code></pre>

<p>which I know is wrong but I can't get my head around it. Any help please?</p>