我有一个表存储长blob类型的图像数据,如何检索phpexcel中的图像显示?我的代码示例:
$order = "SELECT * FROM tblorder";
$tblorder = $conn->query($order);
$row_order = $tblorder->fetch(PDO::FETCH_ASSOC);
$image =$row_order["image"];
$data = base64_encode($image);
$objDrawing = new PHPExcel_Worksheet_MemoryDrawing();
$objDrawing->setName('image');
$objDrawing->setDescription('image');
$objDrawing->getIndexedFilename($data);
$objDrawing->setRenderingFunction(PHPExcel_Worksheet_MemoryDrawing::RENDERING_JPEG);
$objDrawing->setMimeType(PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT);
$objDrawing->setCoordinates('A85');
$objDrawing->setWorksheet($sheet->getActiveSheet());
答案 0 :(得分:0)
cls
import-module sqlps –DisableNameChecking -Verbose:$false | Out-Null
$sql = "USE [MASTER]
GO
CREATE LOGIN [ABC.PROD\My Group Name] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english]
GO"
Invoke-Sqlcmd -Query $sql