I have following script:
$sql = \"SELECT * FROM `users`\"
$q = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($q);
$sql1 = \"SELECT * FROM `ot
$sql = "SELECT * FROM users;";
$q = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($q);
$sql1 = sprintf("SELECT * FROM other_table where username='%s';", $row['username']);
$q1 = mysql_query($sql1) or die(mysql_error());
$row1 = mysql_fetch_array($q1);
// now $row1 contains the tuple of this user and could access the variables are you would // normally do e.g. $row1['ID']