SQLite3::openBlob() - sqlite3数据库类
SQLite3::openBlob()
(PHP 5 >= 5.3.0, PHP 7)
Opens a stream resource to read a BLOB
说明
publicSQLite3::openBlob(string $table,string $column,int $rowid[,string $dbname= "main"[,int $flags= SQLITE3_OPEN_READONLY]]): resourceOpens a stream resource to read or write a BLOB, which would be selected by:
SELECT$columnFROM$dbname.$tableWHERE rowid =$rowid
Note: It is not possible to change the size of a BLOB by writing to the stream. Instead, an UPDATE statement has to be executed, possibly using SQLite's zeroblob()function to set the desired BLOB size.
参数
$tableThe table name.
$columnThe column name.
$rowidThe row ID.
$dbnameThe symbolic name of the DB
$flags Either SQLITE3_OPEN_READONLY
or SQLITE3_OPEN_READWRITE
to open the stream for reading only, or for reading and writing, respectively.
返回值
Returns a stream resource,或者在失败时返回FALSE
.
更新日志
版本 | 说明 |
---|---|
7.2.0 | The$flagsparameter has been added, allowing to write BLOBs; formerly only reading was supported. |
范例
SQLite3::openBlob() example
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!