|
Posted by Danny Wong on 06/21/05 08:03
HI,
The select statement is
"select user_name, user_pass, user_email from ??? where
user_name='$queryuser'"
$queryuser is the variable contains the user you want to retreive, ???
is the table name.
use mysql_fetch_object() to retreive the row object and use it
$data = mysql_fetch_object($result) ;
echo($data->user_name, $data->user_pass, $user_email) ;
Hopes this can help.
Danny Wong
"Domestos" <never.you@mind.net> ΌΆΌg©σΆl₯σ·s»D:J4Gte.29644$%21.12323@newsfe2-gui.ntli.net...
> Hi all,
>
> Using PHP to retrieve data out of a PHP table called Users
>
> There are 10 fields in the table, but I just want the first three called
>
> user_name
> user_pass
> user-email
>
> user_name is the primary key...
>
> now - how do i get just these three fields and stick them into php
> variables...
>
> I can connect to the database and everything - I just need the Select
> Statement and the way to get the query result into PHP variables...
>
> TIA
> Andy Mak
>
>
Navigation:
[Reply to this message]
|