$username Posted September 14, 2008 Share Posted September 14, 2008 Hello All, I am working on a extracting info from maxdb. Right now I would like to test this to see if I can build something to view info in this database. There is this field called "DIST_FILE" This a long byte column in maxdb. To my knowledge this is in b64 encoding. //select the info $sql = maxdb_query("SELECT DIST_FILE FROM DBM350_FGFAXOUT WHERE MSN = '22'"); $file = maxdb_fetch_assoc($sql); //decode the field $filedl = base64_decode($file); //Set header for download header("Content-Disposition: attachment; filename=test"); echo "$filedl"; Does this look even close to something to download the data? Thank you, Brett Quote Link to comment Share on other sites More sharing options...
$username Posted September 14, 2008 Author Share Posted September 14, 2008 New Code But new error <?php include 'dbconnect.php'; $sql = "SELECT * FROM DBM350_FGFAXOUT WHERE MSN = '22'"; $result = maxdb_query($link, $sql) or die(maxdb_error()); list($DIST_FILE) = maxdb_fetch_array($result); header("Content-Disposition: attachment; filename=test"); header("Content-length: 55"); header("Content-type: tif"); Echo "$DIST_FILE"; ?> <br /> <b>Warning</b>: maxdb_fetch_array() [<a href='function.maxdb-fetch-array'>function.maxdb-fetch-array</a>]: Column/Parameter 111 truncated. in <b>C:\Inetpub\wwwroot\work\dl.php</b> on line <b>7</b><br /> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.