I'm trying to update a field on my database and it works good, but not like the way I want.
$already_added_query = "UPDATE MyTable SET id_already_voted = $current_user->ID WHERE id='$id_news' "; // echo $already_added_query; $already_added_exec = mysql_query($already_added_query);I want to add to my database field the userID of the people that voted to the poll, just because I have problem setting cookie :thumbdown:
Like I said it works, but it adds only one userID as below:
Quote
State 0 (no vote)
id_already_voted
0
State 1 (1 vote from userID=10)
id_already_voted
10
State 2 (another vote from userID=3)
id_already_voted
3
id_already_voted
0
State 1 (1 vote from userID=10)
id_already_voted
10
State 2 (another vote from userID=3)
id_already_voted
3
State 0 (no vote)
Quote
id_already_voted
0
State 1 (1 vote from userID=10)
id_already_voted
10
State 2 (another vote from userID=3)
id_already_voted
10,3
0
State 1 (1 vote from userID=10)
id_already_voted
10
State 2 (another vote from userID=3)
id_already_voted
10,3


Sign In
Create Account


Back to top









