Login     Sign up
[problem Solved]SQL Error While clicking dislikes option in dashboard.
john mor (@johninhell)
Join date: Oct 15th 2010
Community posts: 159
View Profile
Send Message

NOw No Error,

MOd can close this thread.

John Adam
VIP member.

171 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

these are the two queries you have to execute

[code]
ALTER TABLE jcow_streams ADD dislikes INT NOT NULL ;
CREATE TABLE IF NOT EXISTS jcow_disliked (
id int(11) NOT NULL auto_increment,
uid int(11) NOT NULL,
stream_id int(11) NOT NULL,
PRIMARY KEY (id),
KEY uid (uid,stream_id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
[/code]

171 months ago
john mor (@johninhell)
Join date: Oct 15th 2010
Community posts: 159
View Profile
Send Message

There was no table earlier.
I created table, with jcow_dislikes.

But than when I went to jcow_streams. the dislike id was not added.

171 months ago
john mor (@johninhell)
Join date: Oct 15th 2010
Community posts: 159
View Profile
Send Message

I have added table "jcow_disliked" & "dislikes" field in jcow_streams. But Whenever some1 click "dislikes".
It gives following error :-
[cpde]
[SQL]
insert into jcow_disliked(uid,stream_id) values('48','3908')

[Error]
Duplicate entry '48' for key 'uid'
[/code]

171 months ago
john mor (@johninhell)
Join date: Oct 15th 2010
Community posts: 159
View Profile
Send Message

[SQL]
insert into jcow_disliked(uid,stream_id) values('48','3908')

[Error]
Duplicate entry '48' for key 'uid'

Dislike option has been added, but i am getting above error when clicking on dislike option.

171 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

click on the sql tab in phpmyadmin and enter the code i gave you and click on the start button.

171 months ago
john mor (@johninhell)
Join date: Oct 15th 2010
Community posts: 159
View Profile
Send Message

Problem Solved. Moderator can close this thread.

171 months ago