-1

我有这个查询:

SELECT (
  *)
   ,
  MATCH(table1.tags,table1.title,table1.description) AGAINST ('".$keywords."' IN BOOLEAN MODE) AS ideas_score 
  FROM table1  JOIN table2 ON table1.id_user = table2.id  HAVING ideas_score > 0 
  ORDER BY ideas_score DESC;

为什么如果我这样做它不起作用?

SELECT (
   table1.description,
 table1.title,
   table1.id,
   table1.id_user,
   table1.tags,
   table1.insert_datetime,
   table2.fb_id,
   table2.fb_aliasname,
   table2.firstname,
   table2.lastname)
   ,
  MATCH(table1.tags,table1.title,table1.description) AGAINST ('".$keywords."' IN BOOLEAN MODE) AS ideas_score 
  FROM table1  JOIN table2 ON table1.id_user = table2.id  HAVING ideas_score > 0 
  ORDER BY ideas_score DESC;

我总是收到这个错误:

Error Number: 1241

Operand should contain 1 column(s)
4

1 回答 1

-1

天哪,对不起,我刚刚注意到 SELECT 不需要()

于 2012-09-16T13:00:55.530 回答