1
jlm69
2.6.0 search module errors
  • 2015/7/26 11:45

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


In the search, on my modules search pages, everything works perfectly. If I use Xoops search I get errors caused by using 'IN' in mysql. Xoops seems to not know what to do with 'IN'. It does not matter how I do it like this:

$criteria->add(new Criteria('cid', '('.$all_ids.')', 'IN'));

or like this

->andWhere($eb->in('cid', $jobs_ids))

like I said they work perfectly in the search within my modules, but if I try the search module it does not treat 'IN' properly.
In the first example it treats 'in' like '<>' which produces no results when there are results.

0.000310 - SELECT * FROM alumni_listing WHERE (valid = :dcValue1 AND cid <> cid AND name LIKE :dcValue2 OR mname LIKE :dcValue3
OR lname LIKE :dcValue4 OR year LIKE :dcValue5) ORDER BY date DESC LIMIT 5 OFFSET 0


In the second example it throughs an exeption.


You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use
near ')) AND ((title LIKE '%test%') OR (type LIKE '%test%') OR (company LIKE '%test%')' at line 1' in
LIB/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91

If I remove the lines it works, except it shows all results even if you don't have permission to see them.

PHP - 5.6.10
MYSQL - 5.5.5-10.0.19-MariaDB

Thanks,
John

2
geekwright
Re: 2.6.0 search module errors

I've responded to this issue on GitHub, where we track issues and resolutions.

https://github.com/XOOPS/XoopsCore/issues/373

Login

Username:
Password:

Lost Password? Register now!

Who's Online

67 user(s) are online (40 user(s) are browsing Support Forums)


Members: 0


Guests: 67


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits