Hi Neil,
One way to do this is to just use "if" and "continue" statements in your loops as follows:
- Code: Select all
foreach ($row as $key=>$val){
if ( $key == 'LocationID' ) continue;
if ( $key == 'AnotherColumnIDontWant' ) continue;
echo ...
}
and for the header portion:
- Code: Select all
for ($i=0; $i<$num_columns; $i++){
if ( mysql_field_name($i) == 'LocationID' ) continue;
if ( mysql_field_name($i) == 'AnotherFieldIDontWant' ) continue;
echo "".mysql_field_name($i)." | ";
}
A little more time with this problem rolling around in my head has produced some more ideas on how I can make this process easier in Dataface.. My previous addition involved modifications at the core of the framework. I may be able to rig something up that is more cosmetic so that only the ResultList class will be affected and you would be able to get a list view with arbitrary SQL queries.
I don't have time right now.. but I'll get something together for the next release..
Best regards
Steve