For advice, about access and PHP

Source: Internet
Author: User
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! ~~
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.