SunQuest
           WAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreWAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old September 14th, 2004, 01:49 AM
dyenne10 dyenne10 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Malaysia
Posts: 19 dyenne10 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 14 m 44 sec
Reputation Power: 0
Send a message via Yahoo to dyenne10
Unhappy How Do I Loop Data In By Cards...pleasee..

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 of the result?

------------------------------------------------------------
<wml>
.....

if ($sth->rows > 0)
{
my $ctr = 1;
while (my @col=$sth->fetchrow_array and $ctr<=4)
{

print "<card id=\"card $ctr\" title=\"Find Data\">";
print "<table columns=\"3\">";
#print "<tr><td><font face=\"Tahoma\" size=\"2\">Result for $xtype in $xarea</font></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..

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreWAP Programming > how to I use next statement in perl +wap


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway