Jump to content

Feature Request software


Recommended Posts

I would rather add a field in the database called "entries_voted". Separate the request id's with a , so that the field in the database will look like this: ",1,2,3,4,5," etc. then add:

if(strpos($entries_voted,",".$request_id.",")) $voted=1

or something to the page.

That way, you would have one string for every IP (or user) and only one query every time a user enters the site.

Link to comment
Share on other sites

chaosblade: What is faster? Retrieving a table, or retrieving a field?

I take it that in your way, there will be one new row for every vote from that IP. In my way, there will be only one row containing all votes for an IP.

I might have misunderstood your syntax though.

Edit: You can easily have an alternate colored list by calling a function like this for every match in the while loop:

function fbg(){

static $bg;


else $bg = "color1";






Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...