[FX.php List] Using one query to feed another

Glenn Singleton glenn at thesingletons.id.au
Tue Oct 18 12:18:05 MDT 2005


Hi

I want to store the "headings" for my fields in a lookup table and  
reference that table every time I lookup data.

So pseudo code might be :

$heading_type = "technical"    ; or "simple" or "crazy" -- these are  
the fields for the lookup table

$rec_id = 5;                                ; this is the record for  
which we wish to display the data

$data = find[for $rec_id]            ; our data array

echo "Here is your data referred to in ".$heading_type." format";

for each field

      $head = find[  $data[field name] ]  ; find field name record in  
heading lookup table

     echo $head[data]." --- ".$data[data]   ;present the data to the  
user in their format

endfor

I will know this "heading_type" from a logon screen when the user  
first enters the system and there are say 100 records in the  
"headings" lookup table,
is there a way to store these, say in a cookie??? (I only know the  
terminology, not how to do it) to save this 2nd lookup for every  
field in the main database ?

Thanks for any help and I hope my pseudo code is not too confusing

By the way, the real use for this is to create a multi-lingual web  
interface as part of the "infocenter" project www.infocntr.net ,  we  
will be releasing all fm and php source code with no passwords under  
a GPL type license agreement.

Regards
Glenn Singleton
"The Infocenter Project "
www.infocntr.net





More information about the FX.php_List mailing list