while list id title year probeg probeg_w stan price marka_m model_m ku

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
while(list($id, $title, $year, $probeg, $probeg_w, $stan, $price, $marka_m, $model_m, $kuzov_m) = mysql_fetch_row($result))
{
if ($probeg_w == 1)
{
$probeg_w = 'ЙЛ';
} elseif ($probeg_w == 2)
{
$probeg_w = 'ЛХКЭ';
}
$qu = "SELECT picture FROM pictures WHERE id_car='$id' LIMIT 0, 1";
$res = mysql_query($qu);
list($picture)=mysql_fetch_row($res);
$qu = "SELECT data FROM marka_of_car WHERE id='$marka_m'";
$res = mysql_query($qu);
list($marka_m)=mysql_fetch_row($res);
$qu = "SELECT data FROM model_of_car WHERE id='$model_m'";
$res = mysql_query($qu);
list($model_m)=mysql_fetch_row($res);
$qu = "SELECT data FROM cuzov_of_car WHERE id='$kuzov_m'";
$res = mysql_query($qu);
list($kuzov_m)=mysql_fetch_row($res);
$qu = "SELECT data FROM stan_of_car WHERE id='$stan'";
$res = mysql_query($qu);
list($stan)=mysql_fetch_row($res);