isBlob($fieldname) ) die("blob.php can only be used to load BLOB or Binary columns. The requested field '$fieldname' is not a blob"); $field =& $table->getField($fieldname); print_r($field); exit; if ( isset($_REQUEST['-index']) ) $index = $_REQUEST['-index']; else $index = 0; $queryTool =& Dataface_QueryTool::loadResult($tablename, null, $_REQUEST); $mimetype = $field['mimetype']; $columns = array($fieldname, $mimetype); $queryTool->loadCurrent($columns, true, true); //echo $mimetype; //echo $table->getValue($mimetype); header("Content-type: ".$table->getValue($mimetype, $index)); //echo "Here"; echo $table->getValue($fieldname, $index); //$res = mysql_query("select small_image from unit_plans limit 1", $app->_db); //list($val2) = mysql_fetch_row($res); //echo "Len 1: ".strlen($val); //echo "Len 2: ".strlen($val2); //if ( $val === $val2 ) echo "They are the same";