Hi
I hpe I can explain my problem.
I have on MySQL DB
1. pricemin
2. pricemax
3.priceperday
4.priceperweek
5.pricepermonth
6.priceperyear
questions:How…
1. to show only pricemin even if the other variables are or not filled2. to show only pricemin and pricemax even if other variables are for not filled3. to show only priceperday even if the other are or not filled …and so on
Here it is what did I have done it:
$order=0;
$sql=”select * from prime where situation=1 and image!=0 order by id desc limit 6″;
$result= mysql_db_query(“prime”, $sql);
while ($regist=mysql_fetch_array($result)) {
$id=$regist[“id”];
$title=$regist[“title”];
$pricemin=$regist[“pricemin”];
$pricemax=$regist[“pricemax”];
$priceperday=$regist[“priceperday”];
$priceperweek=$regist[“priceperweek”];
$pricepermonth=$regist[“pricepermonth”];
$priceperyear=$regist[“priceperyear”];
$type=$regist[“type”];
$ref=$regist[“reference”];
$city=$regist[“city”];
$state=$regist[“state”];
$country=$regist[“country”];
$datain=$regist[“data_in”];
$pricemin=number_format($pricemin,2,”,”,”.”);
$pricemax=number_format($pricemax,2,”,”,”.”);
$priceperday=number_format($priceperday,2,”,”,”.”) ;
$priceperwek=number_format($priceperwek,2,”,”,”.”) ;
$pricepermonth=number_format($pricepermonth,2,”,”, “.”);
$priceperyear=number_format($priceperyear,2,”,”,”. “);
$description=$regist[“description”];
$ordem++;
echo “
<table border=’0′ cellpadding=’0′ cellspacing=’0′ style=’border-collapse: collapse’ width=’100%’ id=’AutoNumber1′>
<tr>
<td width=’75%’ colspan=’3′ bgcolor=’#e5d387′><font FACE=’verdana’ SIZE=’1′ COLOR=’#0000FF’><b>
$tipo , For Sale in or To Let $cidade, $sate <font FACE=’verdana’ SIZE=’2′ COLOR=’#006000′>$country</font></b></td>
<td align=’right’ width=’25%’ bgcolor=’#e5d387′><font FACE=’verdana’ SIZE=’1′ COLOR=’#ff0000′><b>
€ $pricemin – € $pricemax – € $priceperday – € $priceperweek – € $pricepermonth – – € $priceperyear</font></b></td>
<td width=’2%’ bgcolor=’#e5d387′></td>
</tr>
<tr>
<td align=’right’ width=’1%’><a href=’ver_imo.php?lang=$lang&id=$id’><IMG border=’0′
SRC=’admin/get_miniature.php?img=2&client=$id&max_width=80′></a></td>
<td width=’2%’></td>
<td width=’100%’ colspan=’2′ valign=’top’><p class=’text’ align=’justify’><font FACE=’verdana’ SIZE=’2′ COLOR=’#006000′><b>$title</b><font FACE=’verdana’ SIZE=’1′ COLOR=’#000000′>- $description</td>
<td></td>
</tr>
<tr>
<td width=’100%’ colspan=’5′></td>
</tr>
</table>
“;
}
What did I got? I did get the desctitpion, city, estate,country, type, ref, Id right. But the price I do get: 0,00 – 0,00 – 0,00 – 0,00 – 0,00 – 0,00 where suppose to get eighteir the first or the second one or both, or the third or fourth or fifht or sixth or the last four or all at same time depending of the situation.
Did I make mself clear? Any help?
Thanks