Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - splat

Pages: [1]
1
OK, I am using one of the modifcations so that all the votes people make are stored into my database, but many people are now asking me what they have and haven't voted for - and what they voted for it, logically this data should not be to difficult to extract from the database...

I have had  ago so far, but to no avail, so help would really be appreciated.

This code is probably all rubbish what I have come up with...but my PHP skills are not very good :D

Thanks in advance

Code: [Select]
//-----------------------------------------------------
//--- Users See What They Have Rated, and If they Have Rated--------------------------------------------
//-----------------------------------------------------
$sql = "SELECT vote
          FROM ".VOTED_TABLE."
  WHERE image_id = $image_id && user_id = don't no what to put here";
$row = $site_db->query($sql);


if ($row = "5" || "4" || "3" || "2" || "1") {
$msg = "You gave this episode $row stars -- This is currently testing, so is probably wrong";
} else {
$msg = "You have not rated this episode yet, or you are not logged in -- This is currently testing, so is probably wrong";
}

Pages: [1]