Difference between revisions of "Example datanavigation rsp"
From Lianjapedia
Barrymavin (Talk | contribs) m |
Barrymavin (Talk | contribs) |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{DISPLAYTITLE:LianjaScript Server Page Example}} | |
− | + | Example [[Visual FoxPro Server Pages|LianjaScript Server Page (.rsp)]] demonstrating basic data navigation. | |
− | + | ||
− | + | ||
− | Example Visual FoxPro Server Page (.rsp). | + | |
==Code== | ==Code== | ||
Line 16: | Line 13: | ||
? "<br>" | ? "<br>" | ||
− | // | + | // Open the table |
use customers | use customers | ||
− | |||
%> | %> | ||
<table> | <table> | ||
<tr> | <tr> | ||
<% | <% | ||
+ | // Display the table headings | ||
for i = 1 to fcount() | for i = 1 to fcount() | ||
? "<td>" + field(i) + "</td>" | ? "<td>" + field(i) + "</td>" | ||
next | next | ||
− | + | %> | |
+ | </tr> | ||
+ | <% | ||
+ | // Display the data in a table | ||
scan | scan | ||
? "<tr valign='top'>" | ? "<tr valign='top'>" | ||
Line 37: | Line 37: | ||
? "</tr>" | ? "</tr>" | ||
endscan | endscan | ||
+ | // close the table and the database | ||
use | use | ||
− | close | + | close database |
%> | %> | ||
</table> | </table> | ||
Line 44: | Line 45: | ||
</html> | </html> | ||
</code> | </code> | ||
− | |||
[[Category:VisualFoxProCodeExamples]] | [[Category:VisualFoxProCodeExamples]] |
Latest revision as of 04:40, 29 April 2024
Example LianjaScript Server Page (.rsp) demonstrating basic data navigation.
Code
<%@ Language=VFP %> <html> <body> <% // Open the database open database southwind ? "<br>" // Open the table use customers %> <table> <tr> <% // Display the table headings for i = 1 to fcount() ? "<td>" + field(i) + "</td>" next %> </tr> <% // Display the data in a table scan ? "<tr valign='top'>" for i = 1 to fcount() ? "<td>" ? &(field(i)) ? "</td>" next ? "</tr>" endscan // close the table and the database use close database %> </table> </body> </html>