|
Posted by Geoff Berrow on 05/18/07 07:46
Message-ID: <1179449224.547779.325600@p77g2000hsh.googlegroups.com> from
Akhenaten contained the following:
>I actually did adjust the query to pull just the username (for
>simplicity) but it still doesn't pull.
Well it should so keep looking, you have a mistake somewhere. Check the
original data. Is it really the same as the data you are comparing it
with? Furthermore, have you checked that the username is unique before
inserting it in the first place?
Assuming there is a column in the users table called username, something
like:
$sql="SELECT * FROM `answers` , `users` WHERE `qid`
= $qid AND `a_uid` = `userid` AND `users.username`='$username'";
//echo $sql;
$postchk2 = mysql_query($sql,$db);
while($userx=mysql_fetch_array($postchk2)){
print_r($userx);
}
Should produce some results. If not then you can uncomment the $sql and
take a look at it. I usually use MySql and phpMyadmin and so I can just
paste the SQL in to check it.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Navigation:
[Reply to this message]
|