v5:userguide:userguide_index
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
v5:userguide:userguide_index [2016/03/19 04:00] – [$ADODB_FORCE_TYPE] mnewnham | v5:userguide:userguide_index [2016/04/18 03:28] – [Additional Documentation] mnewnham | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <WRAP todo> | ||
- | This page is under reconstruction | ||
- | </ | ||
<WRAP right box> | <WRAP right box> | ||
[[v5: | [[v5: | ||
Line 9: | Line 6: | ||
===== List Of Tutorials ===== | ===== List Of Tutorials ===== | ||
==== Basic Tasks ==== | ==== Basic Tasks ==== | ||
- | |[[v5: | + | < |
- | |[[v5: | + | <wrap left 180px>[[v5: |
- | |[[v5: | + | <wrap left 450px>Using basic ADOdb commands to read data from and write back to the database</ |
+ | </ | ||
+ | -------------------------- | ||
+ | < | ||
+ | <wrap left 180px>[[v5: | ||
+ | <wrap left 450px>How to obtain information about database fields, columns and tables</ | ||
+ | </ | ||
+ | ---------------------------- | ||
+ | < | ||
+ | <wrap left 180px>[[v5: | ||
+ | <wrap left 450px>Understanding how to work with the most detailed level of data provided by ADOdb</ | ||
+ | </ | ||
+ | ------------------------------- | ||
==== Advanced Tasks ==== | ==== Advanced Tasks ==== | ||
- | | [[v5: | + | < |
- | | [[v5: | + | <wrap left 180px>[[v5: |
- | | [[v5: | + | <wrap left 450px>Understanding Transaction scope, and how to start, stop and roll back transactions |
- | ===== Additional Documentation ===== | + | </ |
- | + | ---------------------------- | |
- | [[v5: | + | < |
- | [[project: | + | <wrap left 180px>[[v5: |
- | [[v5: | + | <wrap left 450px> |
- | [[v5:userguide: | + | </ |
- | [[v5: | + | ---------------------------- |
- | [[v5: | + | < |
- | [[v5: | + | <wrap left 180px>[[v5: |
- | + | <wrap left 450px> | |
- | + | </WRAP> | |
- | + | ---------------------------- | |
- | ===== Example 3: Inserting ===== | + | <WRAP> |
- | + | <wrap left 180px>[[v5:userguide:learn_caching:introduction|Result Set Caching]]</wrap> | |
- | Insert a row to the Orders table containing dates and strings that need to be quoted before they can be accepted by the database, eg: the single-quote | + | <wrap left 450px>Caching queries |
- | + | </WRAP> | |
- | <code php> | + | --------------------------- |
- | include(' | + | <WRAP> |
- | $conn = adoONewConnection(' | + | <wrap left 180px>[[v5: |
- | $conn-> | + | <wrap left 450px> |
- | + | </ | |
- | /* | + | -------------------------- |
- | * Inserting a string containing quote characters | + | |
- | * may cause a statement to fail if not pre-processed | + | |
- | */ | + | |
- | $shipto = $conn-> | + | |
- | $orderDate = $conn-> | + | |
- | + | ||
- | $sql = " | + | |
- | $sql .= " | + | |
- | + | ||
- | if ($conn-> | + | |
- | print 'error inserting: ' | + | |
- | + | ||
- | </code> | + | |
- | + | ||
- | In this example, we see the advanced date and quote handling facilities of ADOdb. The unix timestamp (which is a long integer) is appropriately formatted for Access with [[v5:reference:connection:dbdate|dBDate()]]. Note that the date field should not be quoted. If required by the database, the field will be automatically quoted. | + | |
- | + | ||
- | The correct escape character is used for quoting the John's Old Shoppe, which is John``s Old Shoppe and not PHP's default John's Old Shoppe by using [[v5: | + | |
- | + | ||
- | Observe the error-handling of the Execute statement. False is returned by Execute() if an error occurred. The error message for the last error that occurred is displayed in [[v5: | + | |
- | + | ||
- | ===== Example 4: Debugging ===== | + | |
- | + | ||
- | <code php> | + | |
- | include ' | + | |
- | $conn = adoNewConnection(' | + | |
- | + | ||
- | $conn->PConnect(' | + | |
- | $shipto = $conn->qstr(" | + | |
- | + | ||
- | $sql = " | + | |
- | values (' | + | |
- | + | ||
- | $conn->debug = true; | + | |
- | + | ||
- | if ($conn-> | + | |
- | </code> | + | |
- | + | ||
- | + | ||
- | In the above example, we have turned on debugging by setting debug = true. This will display the SQL statement before execution, and also show any error messages. There is no need to call ErrorMsg() in this case. For displaying the recordset, see the rs2html() example. | + | |
- | + | ||
- | For more detailed information on error handling, see the section on [[v5: | + | |
- | + | ||
- | + | ||
- | + | ||
+ | ===== Additional Documentation ===== | ||
+ | < | ||
+ | <wrap left 180px> | ||
+ | <wrap left 450px>A guide to establishing connections across the supported databases</ | ||
+ | </ | ||
+ | ---------------------------- | ||
+ | < | ||
+ | <wrap left 180px> | ||
+ | <wrap left 450px> | ||
+ | </ | ||
+ | ---------------------------- | ||
+ | < | ||
+ | <wrap left 180px> | ||
+ | <wrap left 450px> | ||
+ | </ | ||
+ | ---------------------------- | ||
+ | < | ||
+ | <wrap left 180px> | ||
+ | <wrap left 450px> | ||
+ | </ | ||
+ | ---------------------------- | ||
+ | < | ||
+ | <wrap left 180px> | ||
+ | <wrap left 450px> | ||
+ | </ | ||
+ | ---------------------------- | ||
+ | < | ||
+ | <wrap left 180px> | ||
+ | <wrap left 450px> | ||
+ | </ | ||
+ | ---------------------------- | ||
+ | < | ||
+ | <wrap left 180px> | ||
+ | <wrap left 450px> | ||
+ | </ | ||
+ | < | ||
+ | <wrap left 180px> | ||
+ | <wrap left 450px> | ||
+ | </ | ||
v5/userguide/userguide_index.txt · Last modified: 2020/01/13 15:50 by dregad