[Nfb-web] php, matching data

Bryan Schulz b.schulz at sbcglobal.net
Wed Jan 9 04:53:19 UTC 2013


hi,

sorry if you were trying to solve it. just figured nobody knew php/mysql.
i used sql select with a where name = xyz then picked fields from the 
result.
Bryan Schulz

----- Original Message ----- 
From: "Graham Mehl" <blind at trailstone.com>
To: "'NFB Webmaster's List'" <nfb-web at nfbnet.org>
Sent: Tuesday, January 08, 2013 10:25 PM
Subject: Re: [Nfb-web] php, matching data


> Bryan,
> I have not seen any replies to this email.
> I will attempt a reply, however your usage of Php and tables confuses me a
> little.
>
> Is your master table in a database or on a php web page when your asking
> this question.
> If working solely within a database, I would make your department tables a
> view in to the master table.
>
> if the master table is in a database and you are using a php call to get 
> the
> info, why not just several php calls to the database such that a specific
> department is the selection criteria.
>
> Now if you don't know the department names, but want to list the info in
> separate tables on the php page, then that gets a little tricky.
> I would make a php call to your database sorting on the department. If it 
> is
> not sorted then your php page would have to do that and could make the php
> page messy.
> Once you have the list retrieved then you could do one of two things. One
> approach would to be to loop through the list and if the current 
> department
> did not equal the previous department end your HTML table and start a new
> HTML table for the new department. Or the second approach would be to loop
> through the master table and the department in its own array or in a 
> double
> indexed array. Then loop through the appropriate array to display the info
> later.
>
> Not sure if this helps, but maybe helps the thinking process.
> Good Luck.
>
> --
> Graham
> blind at trailstone.com
>
> -----Original Message-----
> From: Bryan Schulz [mailto:b.schulz at sbcglobal.net]
> Sent: Monday, January 07, 2013 7:31 PM
> To: nfb-web at nfbnet.org
> Subject: [Nfb-web] php, matching data
>
> hi,
>
> been trying to figure something out for hours.
> from the angle of using php,
> say if i have a master table with 180 names, department, age, etc and a
> department table with about ten of those same names, how can i run thru 
> the
> master table and send department, age, etc. to the correct records in the
> smaller department table?
>
> thanks.
> Bryan Schulz
>
>
> _______________________________________________
> Nfb-web mailing list
> Nfb-web at nfbnet.org
> http://nfbnet.org/mailman/listinfo/nfb-web_nfbnet.org
> To unsubscribe, change your list options or get your account info for
> Nfb-web:
> http://nfbnet.org/mailman/options/nfb-web_nfbnet.org/blind%40trailstone.com
>
>
> _______________________________________________
> Nfb-web mailing list
> Nfb-web at nfbnet.org
> http://nfbnet.org/mailman/listinfo/nfb-web_nfbnet.org
> To unsubscribe, change your list options or get your account info for 
> Nfb-web:
> http://nfbnet.org/mailman/options/nfb-web_nfbnet.org/b.schulz%40sbcglobal.net 





More information about the NFB-Web mailing list