Answer the question
In order to leave comments, you need to log in
How to make that when selecting from 2 tables, only the data of the first one and not both are entered into the array?
How to make that when selecting from 2 tables, only the data of the first one and not both are entered into the array?
An array of 2 tables is displayed on the screen, and I need to have only lines from the ShippingOffer in the array after the selection.
The code:
$sql = mysql_query("SELECT * FROM `ShippingOffer` LEFT JOIN `ShippingRequest` USING (station_id) WHERE ShippingOffer.station_id_end = ShippingRequest.station_id_end");
$i = 0;
while ($row = mysql_fetch_row($sql))
{
$arr_so[$i] = $row;
echo "<p>".var_dump($arr_so[$i])."</p>";
$i++;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question