dcsit
Posts: 1
|
Posted: 07/12/2004, 7:07 AM |
|
I have created a grid which points to a MySQL database and displays a number of columns and rows. On one of the columns the select returns either a '0' or '1'. Based on this instead of showing the number I wish to show a graphic (icon). How can I enter the logic for this? I did try changing the properties on the field to Code Expression but I dont know where to enter the code
|
|
|
peterr
Posts: 5971
|
Posted: 07/12/2004, 2:23 PM |
|
If the graphics URL is stored in some database field then you can modify your SQL query to JOIN to the table that contains the graphics URL. Then you can display the graphics URL instead of '0' or '1' and that way show the image.
If you want to specify the graphics by programming code (for example "if 1 then show_graphics1 else show_graphics2) then please post your question to the appropriate forum for the programming language you are using.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
DonB
|
Posted: 07/12/2004, 4:12 PM |
|
I have a sample that I use all the time, written in ASP but directly
transferrable to PHP or whatever you like (nothing ASP unique about it, just
substitute the language syntax and it will work).
http://www.gotodon.com/ccbth/Features/Kbase.asp?find=graphic
--
DonB
logging at http://www.gotodon.com/ccbth, and blogging at http://ccbth.gotodon.net
"dcsit" <dcsit@forum.codecharge> wrote in message
news:440f29b2dc81e2@news.codecharge.com...
> I have created a grid which points to a MySQL database and displays a
number of
> columns and rows. On one of the columns the select returns either a '0'
or
> '1'. Based on this instead of showing the number I wish to show a graphic
> (icon). How can I enter the logic for this? I did try changing the
properties
> on the field to Code Expression but I dont know where to enter the code
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
|