Skip to content
Advertisement

fetching image scr from database using sql

I managed to fetch one image detail from the content column of the table table. I think i need to put this in stored procedure. But I am not too sure how to put it or where to start. I need to fetch all the image details and not just one image from the content column of the table.

uri content id
/websites/ <src=”https://static.google.png”>…< src=”https://static.yahoo.png”> 1
/website1/ <src=”https://static.google2.png”>…< src=”https://static.yahoo3.png”> 2

my current query only returns

Advertisement

Answer

It would be better to do this in your application

If you copy the stored procedure, you need to add DELIMITER at the begining and end, only Mysql Workbench add this automatocally. DBfiddle does it also, so there are no in the example

| link                       |
| :------------------------- |
| https://static.google.png  |
| https://static.yahoo.png   |
| https://static.google2.png |
| https://static.yahoo3.png  |

✓

db<>fiddle here

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement