PHP ("PHP: HypertextPreprocessor") is a universal scripting language widely used in OpenSource and embedded in HTML. Its syntax is similar to C, Java, and Perl and is easy to learn. The important goal of this language is to enable Web development
PHP, or "PHP: Hypertext Preprocessor", is a universal scripting language widely used for Open Source (Open Source) and embedded in HTML. Its syntax is similar to C, Java, and Perl and is easy to learn. The important goal of this language is to allow Web developers to quickly write dynamic, natural Web pages. However, PHP's functionality is not limited to this. PHP is widely considered to be able to implement complex programming tasks faster and more effectively, it is precisely because it is more stable and consumes less resources that it has become a necessary WEB script design language for the development of B/S structure systems, playing a role similar to middleware, that is, syntax parsing and fulfillment.
Oracle lob data model
In B/S (Browser/Server, Browser/Server), you need to store not only simple text information, it also contains images, audio and video materials, or ultra-long texts. For example, if you develop a document system, common characters or other types of data descriptions cannot be applied to binary files or ultra-long texts such as charts and attachments in documents, this requires the backend database to have the ability to store the data. You can apply the Oracle LOB object to achieve this function.
Oracle LOB is a data type used to store a large number of binary and text data (a LOB field can store up to 4 GB of data ). Currently, it can be divided into two types: internal LOB and external LOB. Internal LOB stores data in the database as byte streams. Therefore, many internal LOB controllers can be involved in transactions, or they can be backed up and restored just like normal data. Oracle8i supports three types of internal LOB: BLOB (binary data), CLOB (single-byte character data), and NCLOB (multi-byte country character data ). The CLOB and NCLOB types are used to store ultra-long text data, and BLOB fields are used to store a large number of binary data, such as videos and audios. Currently, Oracle8i only supports one type of external LOB, that is, BFILE. In the database, this type only stores the status information of data in the control system, and the situation of files other than the data object exists in the file system of the control system. Therefore, the data of this type is read-only and does not participate in transactions. This type helps users manage a large number of files visited by external programs.
PHP Oracle 8 function analysis
There are two ORACLE function expansion libraries in PHP, of which ORACLE8 functions promise to visit Oracle8 and Oracle7 databases. these functions apply Oracle8 Call-Inte *** ce (OCI8 ), supports binding local and global PHP variables to the Oracle status tag, and fully supports LOB, FILE, and ROWID. answer: use user-defined variables, that is, user-defined object classes of the user database.
The OCIFetchInto function in the Oracle8 function library is used to retrieve a row of data records and put them into an array. the syntax of this function is described as follows:
Int OCIFetchInto (array & result, int [mode])
The mode parameter can be omitted, and the internal value is OCI_NUM. When visiting Oracle LOB, if you look forward to returning the LOB object, the mode should be set to OCI_ASSOC OCI_RETURN_LOBS.
The OCIBindByName function is used to bind PHP variables with Oracle objects to establish data communication between PHP and Oracle. the Function Syntax is described as follows: