ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Filter bug in Chronoconnectivity ?

vales 04 Dec, 2009
I did a test of connectivity to the table jos_contents.
When I set this filter on WHERE SQL

WHERE fulltext LIKE '%joomla%'

I get this error
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 LIKE '%joomla%'' at line 1 SQL=SELECT count(*) FROM jos_content WHERE fulltext LIKE '%joomla%'

CONTENUTI DI JOOMLA
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 LIKE '%joomla%'' at line 1 SQL=SELECT count(*) FROM jos_content WHERE fulltext LIKE '%joomla%'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 LIKE '%joomla%'' at line 1 SQL=SELECT count(*) FROM jos_content WHERE fulltext LIKE '%joomla%'

If you set the filter on field title or introtext everything is OK.

P.S.
CONTENUTI DI JOOMLA
It is in to Header
nml375 04 Dec, 2009
Hi,
As I rougly recall, 'FULLTEXT' is a reserved keyword in MySQL, so you'll have to properly quote it:
WHERE `fulltext` LIKE '%joomla%'
Or (using the database object to quote the name and pattern on the fly):
<?php
$db = JFactory::getDBO();
echo sprintf(
  'WHERE %s LIKE %s',
  $db->nameQuote('fulltext'),
  $db->quote('%joomla%')
);
?>

/Fredrik
vales 05 Dec, 2009
Hi Fredrik,

Many, many, many thanks you have solved a big problem for me!
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com