How to show a picture from a MySQL Database
Kay C Lan
lan.kc.macmail at gmail.com
Thu Nov 29 23:05:07 EST 2007
On Nov 30, 2007 12:28 AM, Horst <baleareninsel at gmx.net> wrote:
>
> working happy with mySQL since a few month now. But, I can´t figure out
> how
> to show a picture stored in the database. Don´t know if it´s base64
> encoded
> or not.
>
I assume that you are using:
revQueryDatabaseBLOB
Which is specifically used when you are going to refer to a record set that
may contain more than 64K of data, which pictures can easily be.
Conversely, have you tried:
revDataFromQuery
and given it a SQL command that will only return one record:
SELECT img FROM db WHERE id = 1234
Also after your revDataFromQuery make sure you:
put the result into checkErrors
If checkErrors doesn't contain an error message then you know that the data
was successfully extracted. So, if you still can't display the image, then I
suspect it is in a format that Rev doesn't natively recognise.
HTH
More information about the use-livecode
mailing list