https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/
× Welcome to the ToolsJX forum!


Display picture from link store in DB

  • benbet
  • benbet's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 6 days ago #1711

Hi,

With Cardview, I don't understand how can I display an image from a link stored in mysql table.

Exemple :

table.uri = www.sitename/kdskj.jpg

How can I use the <img src=table.uri> ?


Regards,
Ben

Last edit: 12 years 6 days ago by benbet.

Please Log in or Create an account to join the conversation.

More
12 years 6 days ago #1713

Hi,

You can either modify your data, so that you have whole html tags in your database, or you can create a database view that wraps your data in html tags.

You should run something like

CREATE VIEW myview AS SELECT field1, field2, field3, CONCAT('<img src="', image_field, '" />') FROM mytable

Than you can simply use "myview" instead of "mytable" with Card JX.

For more information on database views please refer to mysql documentation:

dev.mysql.com/doc/refman/5.0/en/create-view.html
dev.mysql.com/doc/refman/5.5/en/string-f...html#function_concat

Please Log in or Create an account to join the conversation.

  • benbet
  • benbet's Avatar
  • Visitor
  • Visitor
12 years 6 days ago #1715

OK, perfect.

Thank's :cheer:

Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.168 seconds

Contact Us

Contact us on Discord

Contact us on Facebook