DUMMY51
Joined: 23 Feb 2010
Posts: 1
Posted: 2010-02-23 09:31
Back to top
Reply with quote
|
Hi,
Since I have many columns filled with "Y" or "N", I'm trying to improve the visual result.
I managed to put green tick and red cross images (Y.png and N.png) with this code :
Code: |
'sql|LF' => 'CONCAT(\'<img src="../phpMyEdit/images/\', category_publish, \'.png">\')',
|
Works fine, the page is much easier to read, but when I save the changes, while the database is correctly updated, the images never change.
Emptying the browser cache and refreshing has no effect. Is there another cache somewhere or my code is it wrong ?
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2010-02-24 18:01
Back to top
Reply with quote
|
Use the forum's Search box to search for other CONCAT examples (examples which are conditional based on the field's value).
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2010-02-24 19:01
Back to top
Reply with quote
|
Display either a red or green icon depending on the value of the `hidden` field.
Code: |
$opts['fdd']['hidden'] = array(
'css' => array('postfix' => 'right-justify'),
'default' => '0',
'input' => '',
'maxlen' => 1,
'name' => 'Hidden',
'options' => 'ACPVDFL',
'select' => 'D',
'escape|LF' => false,
'sql|LF' => 'if(hidden = "0", CONCAT("<img src=\"images/pme-red.gif\">"), CONCAT("<img src=\"images/pme-green.gif\">"))',
'sqlw' => 'TRIM("$val_as")',
'values2' => $select_no_yes,
'sort' => true,
'tab|ACP' => 'Hidden etc'
); |
http://phpvs.com/misc/pme-screenshot.gif
http://phpvs.com/misc/pme-red.gif
http://phpvs.com/misc/pme-green.gif
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2010-02-24 19:27
Back to top
Reply with quote
|
Here's another example (not exactly related to the above) which someone might need someday.
A dummy / virtual field which uses CONCAT and REPLACE to alter the value of the `dir` field in order to display a link to an image (instead of a link to the /tn/ subfolder withiin an images directory).
Code: |
$opts['fdd']['dummy1'] = array (
'name' => 'Link',
'sql|LF' => 'if(category = "image" || category = "other",
CONCAT("<a href=\"", dir, "/", filename, "\" target=\"_blank\">link</a>"),
if(category = "thumb", CONCAT("<a rel=\"lightbox\" href=\"", REPLACE(dir, "/tn", "/"), filename, "\" title=\"", photo_text, "\"><img src=\"", dir, "/", filename, "\" ", img_src_attr, " alt=\"\"></a>"), ""))',
'options' => 'L',
'escape' => false,
'sort' => false
);
|
|
sannyloi22
Joined: 07 Sep 2022
Posts: 55
Posted: 2022-09-07 07:47
Back to top
Reply with quote
|
No need to burn bare feet anymore whilst crossing the surface to get a towel.
Aliso Viejo Pro Concrete & Masonry
|
robinjack
Joined: 01 Mar 2021
Posts: 7188
Posted: 2022-09-18 16:15
Back to top
Reply with quote
|
*There is noticeably a bundle to know about this. I assume you made certain nice points in features also.
Amarose
|
topboosterseo
Joined: 24 Jul 2022
Posts: 4494
Posted: 2022-09-27 07:28
Back to top
Reply with quote
|
Pourquoi ne pas noter les valeurs dites la semaine passées via l’état national? Au moins on aurait la capacité discuter selon les véritables chiffres:
Diaetoxil
|
robinjack
Joined: 01 Mar 2021
Posts: 7188
Posted: 2022-09-29 10:56
Back to top
Reply with quote
|
I discovered your site internet site on the search engines and check some of your early posts. Preserve on the great operate. I simply extra increase your Rss to my MSN News Reader. Seeking forward to reading far more by you down the road!…
next
|
topboosterseo
Joined: 24 Jul 2022
Posts: 4494
Posted: 2022-10-01 10:21
Back to top
Reply with quote
|
inkheart has great graphics but the story is not that very impressive.,
Heater Pro X
|
robinjack
Joined: 01 Mar 2021
Posts: 7188
Posted: 2022-10-01 16:09
Back to top
Reply with quote
|
make sense, I had not think of it before, well anyways, thanks for sharing mate! keep posted!
Protetox
|
robinjack
Joined: 01 Mar 2021
Posts: 7188
Posted: 2022-10-05 12:50
Back to top
Reply with quote
|
I visited a lot of website but I conceive this one holds something special in it in it
tcnmicrosites
|
robinjack
Joined: 01 Mar 2021
Posts: 7188
Posted: 2022-10-10 12:06
Back to top
Reply with quote
|
everyone loves wedding parties, it is fun, it is lively and there are lots of food and drinks too,,
mineshanswers
|
topboosterseo
Joined: 24 Jul 2022
Posts: 4494
Posted: 2022-10-13 06:58
Back to top
Reply with quote
|
Perhaps you should also a put a forum site on your blog to increase reader interaction.*::-`
Impact Keto Gummies
|
robinjack
Joined: 01 Mar 2021
Posts: 7188
Posted: 2022-10-16 10:21
Back to top
Reply with quote
|
some hair extensions fit nicely to the your natural hair while others do not fit easily,
satta matka
|
topboosterseo
Joined: 24 Jul 2022
Posts: 4494
Posted: 2022-11-05 06:09
Back to top
Reply with quote
|
fantastic publish, very informative. I ponder why the opposite experts of this sector do not notice this. You must proceed your writing. I am sure, you’ve a huge readers’ base already!
Red Boost
|
Post new topic
Reply to topic
Goto page 1, 2, 3, 4, 5, 6, 7, 8 Next
|