Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Needing to load images into DataGrid from MySQL database as needed.
I have written a query that gets the ID of the needed image. The required image is not in the table. The actual image is in a folder. The table only contains the names of the image and not their locations. The rest of the location needs to be prepended(appended to the front of) the name from the database.
My problem is how to load the needed image and have it appear in the DataGrid.
I did. Plus went to the samples and tutorials without finding anything like this.
Here's what needs to happen: An image in a DataGrid field needs to change according to the id of the listing. The data for the listing is taken from multiple tables in one database. The table that references the images only has the name and not the location of the images. The tables are linked by their numbers. The images themselves are kept in an actual folder and are often changed and/or added to.
"&" is LiveCode's concatenation operator. I'm not familiar with tutorials on it, but since you have two things (path and file name) that need to be concatenated it seems a good fit.
put "/home/user/me/somefolder/images" into tPath
put "123456.jpg" into tFileName
put tPath &"/"& tFileName into tFullPath
set the filename of image "MyImageDisplayObject" to tFullPath
Richard Gaskin LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
I'm using the category ID number to match the event ID with the category ID. There is a different image associated with each category ID number. They are not in the same table. Looking at the DataGrid Tutorials and other stuff. Brigham Young University seems to have a lot of info also.