Top  | Previous | Next

header_logo BLOB images

Blob (Binary Large Object)is a data type for storing large amounts of binary data in an SQL database. Ignition Reporting can use Blobs to display dynamic images within reports. This example will illustrate using blobs with MySQL and the free MySQL Query Browser.

blobtablepreview

Using an Image Placeholder and blobs to dynamically illustrate table row based on department.

 

Example

We begin with the employee table from Tutorial #1 and emp_images, a table that maps departments to images

Employee data can be retrieved with the following SQL query:

SELECT * FROM employees;

employees

 

Images data can be retrieved with the following SQL query:

SELECT * FROM emp_images;

blob

The MySQL Query Browser allows you to upload files as Blobs and view images

 

The following query will SELECT employees with the image as defined by their department

SELECT e.first, e.last, e.income, e.department, i.image FROM employees e, emp_images i WHERE e.department = i.dept;

blobquery1

 

Create a table. Select a column and create an image in it. Set the Key value to your key, image

blobtable

Here's what the table looks like with dynamic images

blobtablepreview