August 1999
Intermediate to advanced
1488 pages
72h 53m
English
connection.cursor(sql) connection.cursor(sql, boolean)
The cursor() method of the Connection object creates a Cursor object that can be used to run SQL queries against the database. The method takes the SQL statement as a parameter, as well as an optional Boolean value that specifies if the cursor is updateable.
Listing 8.15 shows how you would run a query against the database using the cursor() method. The while loop is used to write the results to the user's page.
<SERVER> // Set the query to run var mySQL = myConn.cursor('SELECT name,title FROM employees'); // Iterate through the results and write them to the ... |
Read now
Unlock full access