mysql - PHP search SQL data base -
i have mysql database on domain, made table called accountinformation. in table things accountid
, accountname
, firstname
, secondname
etc.
i made php program connects database , able fetch rows , display them, thats not want do. want fetch information row depending on id.
pseudo-example :
$username string $searchid = 1 $username = fetchrow 'accountid' = $searchid , 'accountname' of row
so have username
of account id 1
in $username
.
ok, should you're looking for...
/* put value of $number id number want other info from*/ $number = "1"; $sql = mysql_query("select * `accountinformation` `id`='$number';"); $result = mysql_fetch_assoc($sql); echo $result["accountname"];
Comments
Post a Comment