Home
Forums
Members
Search
Help
New topics
Todays topics
Website
Welcome Guest, Not a member yet?
Register
Sign In
Login
Username:
Password:
Remember me
Lost Password?
CodeIgniter Forums
Archived Discussions
Archived Development & Programming
How do I display an image in mysql
Pages (2):
1
2
Next »
Share on Google
Share on Facebook
Share on Twitter
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend
Linear Mode
Threaded Mode
How do I display an image in mysql
El Forum
Unregistered
#1
01-17-2010, 03:14 PM
[eluser]farocco[/eluser]
Hello,
I have images stored in mysql that I want to display in a list.
The format is a blob.
I cannot get this to work.
El Forum
Unregistered
#2
01-17-2010, 03:37 PM
[eluser]JHackamack[/eluser]
Do you have sample code that you can post?
El Forum
Unregistered
#3
01-17-2010, 03:39 PM
[eluser]farocco[/eluser]
<img height="100" width="100">image?>"
Thanks
El Forum
Unregistered
#4
01-17-2010, 03:42 PM
[eluser]JHackamack[/eluser]
I believe you might need something like:
Code:
src='data:image/png;base64,<?php echo $image; ?>' alt="Red dot"
If your image is a png and base64 encoded.
El Forum
Unregistered
#5
01-17-2010, 03:51 PM
[eluser]farocco[/eluser]
<img height="100" width="100" alt="red dot">image?>">
Still not working
El Forum
Unregistered
#6
01-17-2010, 03:54 PM
[eluser]JHackamack[/eluser]
What is the HTML being output in your view?
And I see you don't have a SRC tag, which is required
El Forum
Unregistered
#7
01-17-2010, 03:57 PM
[eluser]farocco[/eluser]
My code is getting mangled. I do have a src tag.
How can I paste the code to show?
E•–x¦N ààçÐüØÁÆ)ûIwDvMc6HòÇ÷JŸÓ9ý*¼°˜ÛlˆQ½`þ´ºmùº°²¼>t1˹ŽC'ó8®/ÂWóéÞ/ñ$:…»?Ú";•„C'ûÌ8Ã(À9ã5J«êK‚èuÅG ü©¥ì?*°ÿ?Ý·º„Ÿáp~a‰BÙ A08*F h¤žÄ¸µ¹"úʘQyà~U+uÅ1ª™$EÐ~TÆEÏAùTM
El Forum
Unregistered
#8
01-17-2010, 04:06 PM
[eluser]JHackamack[/eluser]
before you insert into the database do a base64_encode, then echo out the blob normally
Thus you can use the example I have in #3 with the base_64 and it should work.
El Forum
Unregistered
#9
01-17-2010, 04:09 PM
[eluser]farocco[/eluser]
Thank you
Any way around this with existing images?
El Forum
Unregistered
#10
01-17-2010, 06:08 PM
[eluser]JHackamack[/eluser]
use base64_encode around your $image blob.
Pages (2):
1
2
Next »
--------------------
Private Messages
User Control Panel
Who's Online
Search
Forum Home
General
-- News & Discussion
-- Events
-- Lounge
-- Regional User Groups
Using CodeIgniter
-- Installation & Setup
-- Model-View-Controller
-- Libraries & Helpers
-- Best Practices
-- Choosing CodeIgniter
-- General Help
CodeIgniter 4
-- CodeIgniter 4 Roadmap
-- CodeIgniter 4 Development
-- CodeIgniter 4 Feature Requests
-- CodeIgniter 4 Support
-- CodeIgniter 4 Discussion
-- CodeIgniter 4 Addins
Development
-- CodeIgniter 3.x
-- CodeIgniter 2.x
-- Issues
-- NetBeans Plugin
External Resources
-- Spotlight
-- Learn More
-- Jobs
-- Addins
Archived Discussions
-- Archived Libraries & Helpers
-- Archived Development & Programming
Theme © iAndrew 2016 -
Forum software by © MyBB