The results coming from 'Brows Distinct Values' in table structure, are linked to corresponding data row(s).
Implementation regarding feature request ID: 2998185 in sourceforge.
https://sourceforge.net/tracker/index.php?func=detail&aid=2998185&group_id=23067&atid=377411
Display distinct results linked to relevent data rows
Chanaka,
To help test this, could you attach a small export of a few tables (structure and data).
Also, a few suggestions:
- use "browse" instead of "brows" in the class name and parameters
- instead of "if(", use "if ("
- watch your indentations (should be four spaces)
- use the HTML entity & instead of just & to prefix your new parameter in the link
Mofified patch for feature request ID: 2998185
SQL file with some data
Marc,
Thanks for your suggestions. I got that ideas.
The modified patch and the SQL file with some data, has uploaded
Improved patch for feature request ID: 2998185
Marc,
Patch is modified and attached as display_distinct_results_linked_to_data_rows_modified_30_03_2012.diff
Chanaka,
we are almost there. One thing bothers me; to reproduce:
1. ensure that error displaying is activated
2. go to Structure for sales
3. in cars_id, browse distinct values
4. choose car 6 and "show data rows"
5. see this message:
Notice in ./sql.php#117
Undefined index:
Marc,
The parameter deal with sql.php is "browse_distinct" in tbl_structure.php (last modification in patch) and I don't use it in sql.php file.
However I place "$cfg['Error_Handler']['display'] = true;" on top of both sql.php and display_tbl.lib.php files. And I didn't see any notice regarding to this as you mentioned.
Did you try log out and log in after applying the patch. I have to do that two or three times to see the "Show Data Row(s)" link though the functionality is working correctly.
Can you tell me some facts I should see ?
Chanaka,
try placing
$cfg['Error_Handler']['display'] = true;
inside your config.inc.php. Then follow my recipe and see the notice near the bottom of the page.
To see the new link, you only need to empty your browser cache then reload the page.
Hi Marc,
Here are the steps I followed after update the code (git pull),
1. Enable error display by placing $cfg['Error_Handler']['display'] = true; at config.inc.php
2. Create new db and import the attached sql file
3. Go to structure of sales table and browse distinct values for car_id
4. Browse data row for car_id 6
But nothing displayed as notices or errors,
I check whether the error displaying is enabled or not by placing dummy statement ($errorvar = fal;) in config.inc.php and verified error displaying is enabled.
Please help me to make this complete.
Chanaka,
ok I accept your patch; can you adjust it so it can be applied to current master ? (js/messages.php has changed meanwhile)
Patch updated to support latest code base
Marc,
I update the patch so that it can be apply to current master
Your patch was merged in the repository, thanks.