Here is the warning:
user warning: Unknown column 'student2' in 'where clause' query: SELECT first, last, id FROM sgp_student_log WHERE username1 =student2 in .../public_html/includes/common.inc(1731) : eval()'d code on line 18.
Here is the code:
<?
global $user;
$rus = db_query("SELECT first, last, id FROM {student_log} WHERE username1 =%s", $user->name);
$ruw = db_fetch_array($rus);
print_r($ruw);
?>
OF COURSE SOMETHING LIKE the following will work
<?
global $user;
$res = db_query("SELECT first, last, id FROM {student_log} WHERE username1 ='student2'");
$row = db_fetch_array($res);
print_r($row);
?>