08-03-2002, 05:46 AM
Could someone please show me code to select "information" as the table and search the column "uid" and look through it until it find a uid that matches $UID and now that it knows where $uid matches with $UID i want it to echo the username in that row under column "username"
08-04-2002, 04:50 AM
in what language ??
the query would be
"SELECT uid,username FROM information WHERE uid=$UID"
(assuming uid in the DB is an integer else put quotes around it (WHERE uid='$UID')
I assume you mean PHP (cos of the '$' - but could be PERL as well?)
anyway in PHP (and I am assuming there can only be one row returned)
$yaks=mysql_query("SELECT uid,username FROM information WHERE uid=$UID")or die(mysql_error());
<html><body.... etc etc
<tr><td><?echo $row;?></td><td><?echo $row;?></td></tr>
blah blah.... etc