can please someone help me? I do the work at school and I dont know how connect these two tables.
I have two tables :
|Analyze | | Data
+-------------------------+ +-------------------------+
| id_analyze | Name | | id_analyze | Standard |
--------------------------- -------------------------
| 1 | One | 1 | A.11 |
| 2 | two | 1 | A.12 |
| 3 | tree | 1 | A.13 |
| 4 | four | 2 | A.21 |
| 5 | five | 2 | A.22 |
| id_analyze | Name | 3 | A.31 |
All, what I need is get output on web page from these two tables like:
| One | A.11 |
| | A.12 |
| | A.13 |
---------------
| Two | A.21 |
| | A.22 |
I tried a lots of listing but nothing work. For example:
$choose = mysql_query("select * FROM Analyze", $connection);
$choose2 = mysql_query("select * FROM Data,Analyze WHERE Data.id_analyze = Analyze.id_analyze", $connection);
while ($row = mysql_fetch_array( $choose ) ){
while ($row2 = mysql_fetch_array( $choose2 )) {
$Name = $row['Name'];
$Standard = $row2['Standard'];
}
}