posted 3 years ago in CUBRID Apps&Tools category by Esen Sagynov
Today we have great news for our dearest PHP users! We have updated our CUBRID PHP Driver which introduces 13 new APIs to work with LOB data.
Some time in May this year several PHP users requested new functionality in our PHP API to allow importing LOB data from a file, read LOB data from a database with a single
SELECT request, read LOB data into PHP variable, etc. Now all these have been implemented in CUBRID PHP API version 8.4.1.0004. You can install it using:
- Windows Installer (1.6MB)
- DLL for Windows (view tutorial)
sudo pecl install cubridLinux tutorial, Mac OS X tutorial
sudo apt-get install php5-cubridon Debian (view tutorial)
yum install php-cubridon CentOS/Fedora (view tutorial)
We have already updated CUBRID PHP Manual at php.net, and it should take some time until they rebuild the docs. The new APIs include:
cubrid_lob2_newCreate a lob object.
cubrid_lob2_bindBind a lob object or a string as a lob object to a prepared statement as parameters.
cubrid_lob2_exportExport the lob object to a file.
cubrid_lob2_importImport BLOB/CLOB data from a file.
cubrid_lob2_readRead from BLOB/CLOB data.
cubrid_lob2_writeWrite to a lob object.
cubrid_lob2_tellTell the cursor position of the LOB object.
cubrid_lob2_tell64Tell the cursor position of the LOB object.
cubrid_lob2_seekMove the cursor of a lob object.
cubrid_lob2_seek64Move the cursor of a lob object.
cubrid_lob2_sizeGet a lob object's size.
cubrid_lob2_size64Get a lob object's size.
cubrid_lob2_closeClose LOB object.
While php.net is rebuilding their documentation (it's done and accessible online), you can refer to CUBRID PHP APIs to work with LOB object for examples and detailed explanation of each of the above APIs. See also CUBRID PHP API Wiki for more info.
As always, if you find bugs or would like to request a feature, register an issue in our JIRA Issue Tracker for PHP. Or if you have questions, stop by our Q&A site or post to our CUBRID Forum. We will be glad to help you!