Reply to Re: My_SQL retreival...

Your name:

Reply:


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
>
>

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация