lunaticbit wrote:Pls help a time traveller from the past!
lunaticbit wrote:Of course if things have been dramaticaly chaged then the blob files stored in the table would be erroneous, but I must first to find a way to oen/savee frst. But this is an other story to tell after solving this problem.
lunaticbit wrote:As I've been toled from other guys the enviroment is totaly new.
lunaticbit wrote:Replace mysql with mysqli in which specific partof the existing code?
//select data from the the files
//@param int $id
// @return array contains mime type and BLOB data
$id = 1;
public function selectBlob($id)
$sql = "SELECT type, data FROM myfiles WHERE id = :id";
$stmt = $this->conn->prepare($sql);
$stmt->execute(array(":id" => $id));
$stmt->bindColumn(2, $data, PDO::PARAM_LOB);
return array("type" => $type,
"data" => $data);
//close the database connection/
//public function __destruct()
// close the database connection
//$this->conn = null;
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in C:\xampp\htdocs\nictest\matakias.php on line 7
lunaticbit wrote: $db = mysql_connect("localhost", "root", "r00t")
//mysql_select_db("binary_files", $db) or die(mysql_errno() . ": " . mysql_error() . "<br>");
$sql = "SELECT bin_data, filetype, filename, filesize FROM myfiles WHERE id_files=$id"; // line 14
Users browsing this forum: johnwayne and 24 guests