TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,996
  • Total Topics: 21,327
  • Online today: 232
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 196
  • Total: 196

Unknown column '$ID_MEMBER' in 'on clause'

Started by tx3bass, June 25, 2011, 02:13:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tx3bass

SMF version: SMF ver. 2.0
TP version: TP ver. here
Default Forum Language: English
Theme name and version: Custom
Browser Name and Version: FF
Related Error messages:Unknown column '$ID_MEMBER' in 'on clause'

When I click on Show latest comments in the user box I get this error
Unknown column '$ID_MEMBER' in 'on clause'
I just upgraded from SM1.14 to 2.0 and upgraded to the latest version of TP

IchBin

Can you post the full error with the line number and filename that is referenced please? The error doesn't happen here, or I would find out myself. lol

tx3bass

Unknown column '$ID_MEMBER' in 'on clause'
File: *****/Sources/TPmodules.php
Line: 237

IchBin

Thank you!

Yep, looks like a mistake on my part.

Find this line in TPmodules.php
LEFT JOIN {db_prefix}tp_data as log ON (log.value = art.id AND log.type = 1 AND log.ID_MEMBER = $ID_MEMBER)

Replace with this line:
LEFT JOIN {db_prefix}tp_data as log ON (log.value = art.id AND log.type = 1 AND log.ID_MEMBER = '.$ID_MEMBER.')

tx3bass

#4
Template Parse Error!
165: echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="dl-stats3" ' , $context['TPortal']['blockedit']['body']=='dl-stats3' ? 'checked' : '' , '>'.$txt['tp-module3'];
166: echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="dl-stats4" ' , $context['TPortal']['blockedit']['body']=='dl-stats4' ? 'checked' : '' , '>'.$txt['tp-module4'];
167: echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="dl-stats5" ' , $context['TPortal']['blockedit']['body']=='dl-stats5' ? 'checked' : '' , '>'.$txt['tp-module5'];
168: echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="dl-stats6" ' , $context['TPortal']['blockedit']['body']=='dl-stats6' ? 'checked' : '' , '>'.$txt['tp-module6'].'<br />';
169: }
170: elseif($context['TPortal']['blockedit']['type']=='3'){
171: // userbox type
172:
173:

174: <br />';

175: }
176: elseif($context['TPortal']['blockedit']['type']=='15'){
177: // RSS feed type
178: echo '<br /><input style="width: 95%" name="blockbody' .$context['TPortal']['blockedit']['id']. '" value="' .$context['TPortal']['blockedit']['body']. '"><br /><br />';

tx3bass

I get Sorry, you are not allowed to post external links. when I try to make the lat post a BBC code

WillyP

Thanks to the incessant activities of the spammers, we have a mod in place to prevent links in posts, when you are under a certain post count.

I guess you missed this message, which appears when you post:

QuoteNote: We do not allow the newbies user group to post links.
Please type your link out like this if you get an error about it when posting.
"yourdomain dot com"

tx3bass

I am not trying to post a link I was trying to put the code in a BBC block...

Lesmond

tx3bass, I have edited your post for you, not sure why you cant post [code][/code] though


IchBin

Did you make some other edit? The edit I gave you does not edit a template. It edits a source file. If you take the edit out, does the forum load again?

tx3bass

ya that was my fault.  your code did fix it... thanks a lot...

Lum-chan

Maybe it's a good idea to mark this topic as Solved? Worked for me too

Martine M

Running SMF 2.04 - Bloc's Theme Argentum enhanced - TP 1.107 - Main Forum language English - Browser Firefox 21

Greetings Martine

clothahump

Quote from: IchBinâ,,¢ on June 25, 2011, 05:15:13 PM
Thank you!

Yep, looks like a mistake on my part.

Find this line in TPmodules.php
LEFT JOIN {db_prefix}tp_data as log ON (log.value = art.id AND log.type = 1 AND log.ID_MEMBER = $ID_MEMBER)

Replace with this line:
LEFT JOIN {db_prefix}tp_data as log ON (log.value = art.id AND log.type = 1 AND log.ID_MEMBER = '.$ID_MEMBER.')

Got this problem in latest version of TP, lines to change are different to what you have posted here.  :tickedoff:

IchBin

If you received this error after your upgrade, it is likely that your file did not get replaced as this error was fixed. On line 231 in TPmodules.php it now uses $context['user']['id'] instead of $ID_MEMBER.

Attach your file if you still need assistance.

clothahump

Looks like I made a mistake, errors were out of date, sorry.

IchBin

It's a good idea to clear that log and see if you get more. :)

clothahump

Cleared it earlier and nothing to report yet, normally would be something by now so looks good.

This website is proudly hosted on Crocweb Cloud Website Hosting.