|
Posted by Mikro on 03/04/07 16:43
Hi!
My problem is at the end of script. When "if (!empty($bensiin_2["id"]))" is
emtpty (id doesn't exist) then else doesn't echo. Maybe the problem is in
html code?
{
$peavik=("SELECT * FROM soidup_info order by id");
$paevik = mysql_query($peavik);
while($paevik_2 = mysql_fetch_array($paevik))
{echo"
<table border=1 width=100% >
<tr>
<td width=81>"; ?><A
onclick="window.open('xxx.php?raha=<? echo $paevik_2["id"];
?>','','width=480,height=190,scrollbars=no')"
href="javascript:;"><span class=link><? echo" ".date("d-m-Y",
strtotime($paevik_2["kuup"]))." ";?></span></td>
<? echo"
<td width=250>".$paevik_2["marsruut"]."</td>
<td width=200>".$paevik_2["pohjus"]."</td>
<td width=153>".$paevik_2["juht"]."</td>
<td width=80 align=center>".$paevik_2["alg"]."</td>
<td width=80 align=center>".$paevik_2["lopp"]."</td>";
$bents=("SELECT * FROM soidup_bensiin where u_id=".$paevik_2["id"]."");
$bensiin = mysql_query($bents);
while($bensiin_2 = mysql_fetch_array($bensiin)) {
if (!empty($bensiin_2["id"]))
{
echo"<td align=center>".$bensiin_2["kogus"]."L</td></tr>"; }
else {echo" <td align=center>pole midagi</td> </tr>"; }
}
}
}
Navigation:
[Reply to this message]
|