Author Topic: help creating mod so members can see if they have voted.  (Read 2657 times)

0 Members and 1 Guest are viewing this topic.

Offline splat

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • http://www.malcolminthemiddle.co.uk/
help creating mod so members can see if they have voted.
« on: April 11, 2005, 02:13:18 PM »
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";
}