
var userId = unscramble(client.userId)
var bucket = project.sharedConnections.connections[userId]
var connection = bucket.connection
// Select all customers so we may create a list to choose from below.
var cursor = connection.cursor("select * from customer order by ID")
project.sharedConnections.cursors[userId] = new CursorBucket(cursor)
Customers by ID
Click on ID to modify the customer
ID |
Name |
Address |
City |
State |
ZIP |
Telephone |
/* Dynamically create a table filled with all of the customers in the
CUSTOMER table as specified by the database query at the top of the page.
We also make each customer ID a link to the "modify1.htm" page, with the ID
value an argument of the URL string so that it will be passed to "modify1.htm"
as a property of the REQUEST object.
*/
for (var i = 0; i < 5; i++) {
if (cursor.next()) {
write(cursor.ID);
|
write(cursor.name); |
write(cursor.address); |
write(cursor.city); |
write(cursor.state); |
write(cursor.zip); |
write(cursor.phone); |
}
}