dyenne10
14-09-2004, 11:16 AM
hi there..i need some help in wml and perl prog..straight 2 da point..
There are a couple of rows in the sql results and what I want to do is display only 5 data on one Wml card and 5 more on the second row so on until the end?
------------------------------------------------------------
<wml>
.....
if ($sth->rows > 0)
{
my $ctr = 1;
while (my @<hidden>=$sth->fetchrow_array and $ctr<=4)
{
print "<card id=\"card $ctr\" title=\"Find Data\">";
print "<table columns=\"3\">";
#print "<tr><td><u><font face=\"Tahoma\" size=\"2\">Result for $xtype in $xarea</font></u></td></tr>";
print "<tr>";
print "<td>No.</td>";
print "<td>Price</td>";
print "<td>Area</td>";
print "</tr>";
my $zlokasi=$col[4];
my $zjenis=$col[6];
my $zadd=$col[3];
my $zprice=$col[5];
print "<tr>";
print "<td>$ctr</td>";
print "<td>RM $zprice</td>";
print "<td><anchor>$zadd<go href=\"page3.cgi\">";
print "<postfield name=\"add\" value=\"$zadd\"/>";
print "</go></anchor></td>";
print "</tr>";
$ctr++;
print "<tr><td>";
print "<do type=\"accept\" label=\"Next\">";
print "<go href=\"#card $ctr\"/></do>";
print "</td></tr>";
print "</table>";
print "</card>";
}
next;
}else
{
print "<card id=\"No Data\">";
print "<font face=\"Tahoma\" size=\"2\">RESULTS NOT FOUND</font>";
print "</card>";
}
print "</wml>";
---------------------------------------------
i look up for an example in
"http://www.experts-exchange.com/ Programming/ Wireless_Programming/Q_20457711.html"..and i try to run it...quite success but...it display only one data in one card......so..please somebody help me..
thanks
There are a couple of rows in the sql results and what I want to do is display only 5 data on one Wml card and 5 more on the second row so on until the end?
------------------------------------------------------------
<wml>
.....
if ($sth->rows > 0)
{
my $ctr = 1;
while (my @<hidden>=$sth->fetchrow_array and $ctr<=4)
{
print "<card id=\"card $ctr\" title=\"Find Data\">";
print "<table columns=\"3\">";
#print "<tr><td><u><font face=\"Tahoma\" size=\"2\">Result for $xtype in $xarea</font></u></td></tr>";
print "<tr>";
print "<td>No.</td>";
print "<td>Price</td>";
print "<td>Area</td>";
print "</tr>";
my $zlokasi=$col[4];
my $zjenis=$col[6];
my $zadd=$col[3];
my $zprice=$col[5];
print "<tr>";
print "<td>$ctr</td>";
print "<td>RM $zprice</td>";
print "<td><anchor>$zadd<go href=\"page3.cgi\">";
print "<postfield name=\"add\" value=\"$zadd\"/>";
print "</go></anchor></td>";
print "</tr>";
$ctr++;
print "<tr><td>";
print "<do type=\"accept\" label=\"Next\">";
print "<go href=\"#card $ctr\"/></do>";
print "</td></tr>";
print "</table>";
print "</card>";
}
next;
}else
{
print "<card id=\"No Data\">";
print "<font face=\"Tahoma\" size=\"2\">RESULTS NOT FOUND</font>";
print "</card>";
}
print "</wml>";
---------------------------------------------
i look up for an example in
"http://www.experts-exchange.com/ Programming/ Wireless_Programming/Q_20457711.html"..and i try to run it...quite success but...it display only one data in one card......so..please somebody help me..
thanks