VB 实例 显示数据库数据

vb 实例

显示数据库数据

@code
dim db = database.open("smallbakery") 
dim query = "select * from product" 
end code

<html> 
<body> 
<h1>small bakery products</h1> 
<table border="1" width="100%"> 
<tr>
<th>id</th> 
<th>product</th> 
<th>description</th> 
<th>price</th> 
</tr>
@code
dim row
for each row in db.query(query)
end code

<tr> 
<td>@row.id</td> 
<td>@row.name</td> 
<td>@row.description</td> 
<td align="right">@row.price</td> 
</tr> 
@code next end code
</table> 
</body> 
</html>

相关文章