Unknown column
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #1
Unknown column
This new error is replicating for every few seconds

Code:
1
2
3
4
5
6
7
8
9
10
11
Type: 20
File:  (Line no. 0)
Message
SQL Error: 1054 - Unknown column 'tfd.desc' in 'field list'
Query:
       SELECT t.*, tfd.`desc` AS `xthreads_desc`, t.username AS threadusername, u.username, u.avatar
       FROM xxx_threads t
       LEFT JOIN xxx_users u ON (u.uid = t.uid)
       WHERE t.fid IN (4,148,149) AND t.tid IN (0,'108','11') AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
       ORDER BY t.dateline DESC
       LIMIT 0, 10

What is causing this?

11-19-2010 05:24 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #2
RE: Unknown column
Didn't you create a field called xthreads_desc? A description for your threads maybe?

[Image: 468x602b.png]
11-19-2010 05:42 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #3
RE: Unknown column
(11-19-2010 05:24 AM)1master1 Wrote:  What is causing this?

And from what table the desc comes from?

11-19-2010 05:58 AM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #4
RE: Unknown column
yes, i created a thread desc field for a forum and i declared it correctly.

no clue, rateu Frown
11-19-2010 06:40 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #5
RE: Unknown column
I think, when querying something, we need to know in which table the data stored..........

(This post was last modified: 11-19-2010 07:22 AM by RateU.)
11-19-2010 07:22 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: Unknown column
As said, the query doesn't know what "tfd.`desc`" is.
I presume you need to join a table for that to work.

My Blog
11-19-2010 07:27 AM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #7
RE: Unknown column
i called the {$threaddescription) in thread view after the threadtitle in <thead>

{$threadname} - {$threaddecription}
is this causing the error?
11-20-2010 11:59 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #8
RE: Unknown column
(11-20-2010 11:59 PM)1master1 Wrote:  i called the {$threaddescription) in thread view after the threadtitle in <thead>

{$threadname} - {$threaddecription}
is this causing the error?

Do you mean by the "thread view" is showthread page?
I think the error comes from the script.

If all you want is thread description, we already have thread description example application.

11-21-2010 04:26 AM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #9
RE: Unknown column
yes rateu, i used in the showthread template.
11-21-2010 05:08 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #10
RE: Unknown column
If you use the XThreads example thread description application, you can add {$GLOBALS['threadfields']['desc']} variable in your showthread template for displaying the thread description in showthread page. Or maybe, it is not what you want to do?

11-21-2010 05:16 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: