For advice, about access and PHP
This post was last edited by Xlxyx on 2014-11-03 16:03:52
$conn = new COM ("ADODB. Connection ");
$connstr = "Driver={microsoft Access DRIVER (*.mdb)}; Dbq= ". Realpath ("Magazine.mdb");
$conn->open ($CONNSTR);
$rs = new COM ("ADODB. RecordSet ");
$rs->open ("SELECT * from Db_circulateplay", $conn, 1, 1);
?>
$rs->open ("SELECT * from Db_circulateplay", $conn, 1, 1); What is the meaning of this statement?
------to solve the idea----------------------
$rs->open ("SELECT * from Db_circulateplay", $conn, 1, 1); May I ask this statement, the
Of these, 1, 1, the previous 1 is the cursor type, and the next 1 is the lock type:
There are four optional values for the cursor type: 0,1,2,3 defaults to 0
0 means forward-only cursors, no paging, Recordset, BookMark
1 means a keyset cursor, and other user modifications to the record are reflected in the recordset, but other users add or delete records that are not reflected in the recordset. Support Paging, Recordset,bookmark
2 means dynamic cursors that support all features, but are most resource-intensive
3 means static cursors, changes that the user makes to the record, additions or deletions of records are not reflected in the recordset. Supports moving forward or backward
Lock type selectable values are 1,2,3,4
1 means read-only and does not allow any changes to the recordset
2 means pessimistic locking, when modified immediately lock records, more expensive resources
3 means optimistic locking, which locks the recordset only when the Update method is called
4 means no locking, change, insert, and delete are done in batch mode
If I answer the exact, you understand, please give the sub-son it! ~~