У меня есть 3 таблицы:Как SQL внутреннего соединения следующих таблиц
--------
| test |
--------
| id |
--------
-----------------------
| testconnection |
-----------------------
| testid | pharmacyid |
-----------------------
-----------------------------------
| testcontent |
-----------------------------------
| id | testID | title | shortened |
-----------------------------------
и мне нужно, чтобы связать testcontent's
title
и shortened
с testconnection
так, что поле pharmacyid
связанно с моей текущей петлей для аптек.
Вот как это выглядит сейчас:
$sql = mysql_query("SELECT * FROM pharmacies");
while($pharmacy = mysql_fetch_array($sql)) {
and here i'd like to access testcontent's title and shortened for this particular pharmacy
}
Используете ли вы MS SQL Server или MySQL? – jarlh
@jarlh Я использую MySQL – Xeen