Back to top

Autore Topic: com_search bacato?  (Letto 1349 volte)

Offline alamar77

  • Nuovo arrivato
  • *
  • Post: 39
    • Mostra profilo
com_search bacato?
« il: 11 Mag 2007, 10:33:03 »
Ciao a tutti!
Stavo modificando il com_search per alcune mie necessità quando mi accorgo che non fa ricerche nei contenuti non statici... Gli faccio stampare la query e la eseguo su phpmyadmin...
Risultato:

 query SQL: Documentazione

SELECT a.title AS title, a.created AS created, CONCAT( a.introtext, a.fulltext ) AS text, CONCAT_WS( '/', u.title, b.title ) AS section, CONCAT( 'index.php?option=com_content&task=view&id=', a.id ) AS href, '2' AS browsernav, 'content' AS
TYPE , u.id AS sec_id, b.id AS cat_id
FROM jos2_content AS a
INNER JOIN jos2_categories AS b ON b.id = a.catid
INNER JOIN jos2_sections AS u ON u.id = a.sectionid
WHERE (
(
LOWER( a.title ) LIKE LOWER( '%mondo%' )
OR LOWER( a.introtext ) LIKE LOWER( '%mondo%' )
OR LOWER( a.fulltext ) LIKE LOWER( '%mondo%' )
OR LOWER( a.metakey ) LIKE LOWER( '%mondo%' )
OR LOWER( a.metadesc ) LIKE LOWER( '%mondo%' )
)
)
AND a.state =1
AND u.published =1
AND b.published =1
AND a.access <=0
AND b.access <=0
AND u.access <=0
AND (
a.publish_up = '0000-00-00 00:00:00'
OR a.publish_up <= '2007-05-11 10:10'
)
AND (
a.publish_down = '0000-00-00 00:00:00'
OR a.publish_down >= '2007-05-11 10:10'
)
GROUP BY a.id
ORDER BY a.created DESC
LIMIT 0 , 30

Messaggio di MySQL: Documentazione
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'fulltext ) AS text , CONCAT_WS( '/' , u . title , b . title ) AS section , CONCA' at line 1

non riesco a capire dove sta l'errore... e visto che non l'ho modificata vuol dire che la canna SEMPRE! anche per i siti che ho già messo on line!
Ma come e' possibile?
Puo' essere un problema di server MySQL? Io ho la versione 4.1.22

Grazie a tutti!

Massimo

Offline alamar77

  • Nuovo arrivato
  • *
  • Post: 39
    • Mostra profilo
Re: com_search bacato?
« Risposta #1 il: 11 Mag 2007, 10:50:18 »
Su MySQL 5 la query viene correttamente eseguita... quindi suppongo che sia un problema del 4.. c'e' qualcuno che ha avuto il mio stesso problema e l'ha risolto senza dover uppare mysql alla 5?

Grazie

Massimo

 



Web Design Bolzano Kreatif