ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:blobdecode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
reference:blobdecode [2015/07/27 05:26] mnewnhamv5:reference:connection:blobdecode [2016/01/17 02:37] (current) – ↷ Page moved from v5:reference:blobdecode to v5:reference:connection:blobdecode mnewnham
Line 2: Line 2:
 ~~NOTOC~~ ~~NOTOC~~
 <WRAP info> <WRAP info>
-Support for this function is limited. See the [[reference:compatibility_matrix|Feature Comptibility Matrix]]+Support for this function is limited. See the [[v5:database:feature_comparison|Feature Comparison Matrix]]
 </WRAP> </WRAP>
 <WRAP right box> <WRAP right box>
 == Syntax == == Syntax ==
-  function blobDecode( +  mixed blobDecode( 
-      blob $blob+      string $blob
   )   )
 </WRAP> </WRAP>
 ===== Description ===== ===== Description =====
-The function ''blobDecode()'' decodes a blob field.+The function ''blobDecode()'' decodes a blob field and returns the value of the field or false if the function fails. 
 ------------------------------- -------------------------------
 ===== Usage ===== ===== Usage =====
Line 18: Line 19:
 $SQL = "SELECT blob_field FROM table"; $SQL = "SELECT blob_field FROM table";
 $blob = $db->blobDecode($db->getOne($SQL)); $blob = $db->blobDecode($db->getOne($SQL));
 +
 +file_put_contents('/temp/stored.jpg',$blob);
 +
  
 </code> </code>
v5/reference/connection/blobdecode.1437967567.txt.gz · Last modified: 2017/04/21 11:37 (external edit)