I'm trying to return all records from my database where the userID is equal to the logged in user.
I have the following only for some reason its not returning anything, can anybody see any obvious errors?
<?php
$interestsquery = "SELECT *
FROM user_interests
WHERE user_id = $usersClass->userID()";
$result = mysql_query($interestsquery);
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "{$row['interest']}";
}
?>