NYCPHP Meetup

NYPHP.org

[nycphp-talk] A few questions

Hans Zaunere zaunere at yahoo.com
Sun May 18 13:28:45 EDT 2003


--- "John W. Markert" <markert at optonline.net> wrote:
> I could use a few answers from a kind sole out there....
> 
> When using PHP with MySQL is there a way to find the index of a
> field/column by providing the associative name? I have n related elements
> in a table that I want to process in a loop and I want to ask MySQL where
> to start processing.

I'm not sure if I understand 100%, but maybe all you need is a SELECT
statement?  Something like:

SELECT * FROM mytable WHERE col1='name'

If you need to restrict the results more, you can of course add tests to the
WHERE clause.

> Is there a way to get the logged in user name under Windows 2000 with PHP?

I'm assuming you mean with PHP running under Windows 2000 as the server
environment?  If so, then phpinfo(); should give you a broad list of
available environment variables, one of which being the user that owns the
process.

H

> Thanks for  your help.
> 
> John
> 
> ___________________________________________
> 
> John W. Markert
> 14 Joanna Way
> Kinnelon, NJ 07405
> Phone: (973)838-8956
> Cell: (201)788-1740
> Fax: (973)838-4561 
> 
> 
> 
> --- Unsubscribe at http://nyphp.org/list/ ---
> 
> 




More information about the talk mailing list