Query to get threads ?
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #12
RE: Query to get threads ?
???
A '-' character is either a subtraction operator, or a negation.  You cannot include them in variable names.  Did you mean the underscore (_) character instead.

"$thread-trend[...]" is an invalid PHP expression.  It means "get the $thread variable, and subtract trend[...] from it.  But trend isn't prefixed with a $, so it can't be a variable, it must be a fixed (constant) expression.  But constants can't be arrays, therefore, it's invalid syntax"
With the above expression, you should get something like:

Code:
Parse error: syntax error, unexpected '[', expecting ',' or ';' in ... on line ...



Adapt the following to your needs.

PHP Code:
$query = $db->query(' SELECT t.subject, p.prefix from '.TABLE_PREFIX.'threads t LEFT JOIN '.TABLE_PREFIX.'threadprefixes p ON t.prefix=p.pid ...');


My Blog
(This post was last modified: 08-22-2010 09:54 PM by ZiNgA BuRgA.)
08-22-2010 09:54 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Query to get threads ? - Imran - 08-18-2010, 07:02 AM
RE: Query to get threads ? - ZiNgA BuRgA - 08-18-2010, 07:36 AM
RE: Query to get threads ? - Imran - 08-18-2010, 04:42 PM
RE: Query to get threads ? - ZiNgA BuRgA - 08-18-2010, 07:38 PM
RE: Query to get threads ? - Imran - 08-18-2010, 09:53 PM
RE: Query to get threads ? - FBI - 08-21-2010, 08:36 PM
RE: Query to get threads ? - Imran - 08-21-2010, 09:01 PM
RE: Query to get threads ? - ZiNgA BuRgA - 08-21-2010, 10:13 PM
RE: Query to get threads ? - FBI - 08-22-2010, 01:06 AM
RE: Query to get threads ? - ZiNgA BuRgA - 08-22-2010, 08:44 AM
RE: Query to get threads ? - FBI - 08-22-2010, 06:19 PM
RE: Query to get threads ? - ZiNgA BuRgA - 08-22-2010 09:54 PM

 Standard Tools
Forum Jump: