News:

Join the Facebook Fan Page.

Main Menu

Voting on Polls error

Started by Dunrobin, March 14, 2004, 12:36:33 PM

Previous topic - Next topic

Dunrobin

I couldn't vote on a poll I created; I'd just get a database error message.  When I checked the Forum Error Log, I found this message:

Database Error: Column: 'ID_MEMBER' in on clause is ambiguous
File: /../public/Sources/Poll.php
Line: 97

The problem in the query was in line 94:
QuoteLEFT JOIN {$db_prefix}log_polls AS lp ON (p.ID_POLL = lp.ID_POLL AND ID_MEMBER = $ID_MEMBER)

should be:
QuoteLEFT JOIN {$db_prefix}log_polls AS lp ON (p.ID_POLL = lp.ID_POLL AND p.ID_MEMBER = $ID_MEMBER)

That fixed the problem for me.  I didn't see any mention of this error in the threads posted here, so I thought I should add it in case anyone else has run into it.
"Quiet, knumbskulls!  I'm broadcastin'!"

The Three Stooges Online Filmography

Grudge

Interesting. It's fixed in CVS so I guess someone here fixed it at some point. Anyway - your fix isn't quite right. It should be lp.ID_MEMBER and not p.ID_MEMBER.

Thanks

Grudge
I'm only a half geek really...

Dunrobin

Quote from: Grudge on March 14, 2004, 12:44:40 PM
Interesting. It's fixed in CVS so I guess someone here fixed it at some point. Anyway - your fix isn't quite right. It should be lp.ID_MEMBER and not p.ID_MEMBER.

Thanks

Grudge
Thanks, Grudge!
"Quiet, knumbskulls!  I'm broadcastin'!"

The Three Stooges Online Filmography

Spaceman-Spiff

getting the same error

from smf_1-0.sql:
#
# Table structure for table `polls`
#

CREATE TABLE {$db_prefix}polls (
  ID_POLL mediumint(8) unsigned NOT NULL auto_increment,
  question tinytext NOT NULL default '',
  votingLocked tinyint(1) NOT NULL default '0',
  maxVotes tinyint(4) unsigned NOT NULL default '1',
  expireTime int(10) unsigned NOT NULL default '0',
  hideResults tinyint(4) unsigned NOT NULL default '0',
  ID_MEMBER mediumint(8) unsigned NOT NULL default '0',
  posterName tinytext NOT NULL default '',
  PRIMARY KEY (ID_POLL)
) TYPE=MyISAM;


but from my table:
#
# Table structure for table `yabb_polls`
#

CREATE TABLE `yabb_polls` (
  `ID_POLL` mediumint(8) unsigned NOT NULL auto_increment,
  `question` tinytext NOT NULL,
  `votingLocked` tinyint(1) NOT NULL default '0',
  `maxVotes` tinyint(4) unsigned NOT NULL default '1',
  `expireTime` int(10) unsigned NOT NULL default '0',
  `hideResults` tinyint(4) unsigned NOT NULL default '0',
  PRIMARY KEY  (`ID_POLL`)
) TYPE=MyISAM AUTO_INCREMENT=79 ;


i seem to be missing the last 2 rows
or are they removed but not yet changed in the .sql file?

[Unknown]

Please run upgrade.php.

-[Unknown]

Spaceman-Spiff


Advertisement: