We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Forum search function error in mongo db error | Forum

Ash
Ash Jan 5
Hi All


Can you please help resolve this error ?


Its a typical Error which always comes when we install oxwall on mongo db NOT MySQL - i am using a2hosting 


Error details:Type:ExceptionMessage:SQLSTATE[42000]: Syntax error or access violation: 1064 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 'rows' at line 23File:/home/mumbailo/open-source.in/lab1/ow_core/database.phpLine:723Trace:#0 /home/mumbailo/open-source.in/lab1/ow_core/database.php(723): PDOStatement->execute() #1 /home/mumbailo/open-source.in/lab1/ow_core/database.php(385): OW_Database->execute('\r\n S...', Array) #2 /home/mumbailo/open-source.in/lab1/ow_system_plugins/base/bol/search_entity_dao.php(387): OW_Database->queryForRow('\r\n S...', Array) #3 /home/mumbailo/open-source.in/lab1/ow_system_plugins/base/classes/mysql_search_storage.php(277): BOL_SearchEntityDao->findEntitiesCountByText('test', Array, 0, 0) #4 /home/mumbailo/open-source.in/lab1/ow_core/text_search_manager.php(303): BASE_CLASS_MysqlSearchStorage->searchEntitiesCount('test', Array, 0, 0) #5 /home/mumbailo/open-source.in/lab1/ow_plugins/forum/bol/text_search_service.php(430): OW_TextSearchManager->searchEntitiesCount('test', Array) #6 /home/mumbailo/open-source.in/lab1/ow_plugins/forum/bol/forum_service.php(2077): FORUM_BOL_TextSearchService->countTopicsInGroup('test', 1, NULL) #7 /home/mumbailo/open-source.in/lab1/ow_plugins/forum/controllers/search.php(415): FORUM_BOL_ForumService->countTopicsInGroup('test', 1, NULL) #8 /home/mumbailo/open-source.in/lab1/ow_plugins/forum/controllers/search.php(115): FORUM_CTRL_Search->searchEntities(Array, 'group') #9 [internal function]: FORUM_CTRL_Search->inGroup(Array) #10 /home/mumbailo/open-source.in/lab1/ow_core/request_handler.php(250): ReflectionMethod->invokeArgs(Object(FORUM_CTRL_Search), Array) #11 /home/mumbailo/open-source.in/lab1/ow_core/request_handler.php(226): OW_RequestHandler->processControllerAction(Object(ReflectionMethod), Object(FORUM_CTRL_Search)) #12 /home/mumbailo/open-source.in/lab1/ow_core/application.php(346): OW_RequestHandler->dispatch() #13 /home/mumbailo/open-source.in/lab1/index.php(76): OW_Application->handleRequest() #14 {main}

Ash
Ash Jan 5
Hi 

i contacted the hosting guys below is what they updated for above error:


  it's related to the incorrect syntax used in your database which doesn't work with the current MariaDB version. Since it's a site development issue, please contact your developer to correct the syntax of your database and if any exact server configuration changes are required, please let us know.


--

Can anyone help?


Look fw

Thanks

Cheers!

Patricia Zorrilla Leader

There may be other methods, but what I would do would be to capture the failed SQL command and consult the MariaDB documentation.

Normally these problems with MariaDB are that it requires that all quotation marks be expressed in the expressions. Other databases are less strict.

To look at this you have to repeat your steps: Install OxWall in the same version of MariaDB and with the same version of PHP, so the ideal would be to do it from your account in a2hosting

Ash
Ash Jan 5
I better switch to old MySQL standard, cant risk everytime solving bugs on MAria DB and every time running around for help, however Maria DB is said to be far more capable then MySQL.
Quote from Patricia Zorrilla Bcn

There may be other methods, but what I would do would be to capture the failed SQL command and consult the MariaDB documentation.

Normally these problems with MariaDB are that it requires that all quotation marks be expressed in the expressions. Other databases are less strict.

To look at this you have to repeat your steps: Install OxWall in the same version of MariaDB and with the same version of PHP, so the ideal would be to do it from your account in a2hosting


Patricia Zorrilla Leader

I don't know if MariaDB is better, equal or worse. Maybe I change something for purposes of speed or possibilities with complex queries, but OxWall queries and their usual plugins are very simple (but very repetitive), so I don't think you notice any changes.

Where you will notice performance changes is in the amount of memory and "cpu's" that you have assigned to your account on your server.

I do not understand much of that and I will not recommend my server because it is very expensive, they charge me a lot every month ... but 50% of my users are "paid members" and I have to sell quality services if I want charge and live off the subtraction.

Do not pretend great returns of a cheap server with a free script with 4 plugins of 20 USD ... You have to bet harder: and a good server is the first step. The second is to customize the code that runs on the server.

I am not a computer professional, for me it is only a hobby and I can only advise you, but there are very good professionals around here that based on what you have now they can perfect you a lot.

Paul
Paul Jan 6
open ow_system_plugins/base/bol/search_entity_dao.php

Go to line ~414 and change "rows" to "`rows`";


Same on line 639

Ash
Ash Jan 6
Hi Paul - thanks for your reply


 line ~414 does not have the word "rows" 

and it says: ':activated' => self::ENTITY_ACTIVATED

same with line ~639, it shows some other code, 
can you please check the default path or file name is correct?


Thanks in Advance

Cheers!

Paul
Paul Jan 6
Did you open the right file or modified yours?


The original repository is line 414 & 639

https://github.com/...earch_entity_dao.php

Ash
Ash Jan 6
I did not modify anything, it was auto installed via softaculaous and theme bought from store, let me try to replace the file with your link !
Paul
Paul Jan 6
I would do that. Just earch for "rows" end add the missing quotes
Ash
Ash Jan 6

Quote from Paul I would do that. Just earch for "rows" end add the missing quotes
Hi Paul - I just did it but error coming 

currently unable to handle this request.

HTTP ERROR 500please see the screen shot how i did for both "rows" end..  anything missing?
tHANKS

Paul
Paul Jan 6
That's the wrong quote type. Copy and paste mine:

as `rows`';
The Forum post is edited by Paul Jan 6
Ash
Ash Jan 6

Quote from Paul That's the wrong quote type. Copy and paste mine:
as `rows`';


Quote from Paul That's the wrong quote type. Copy and paste mine:
as `rows`';
Yes!!! Solved!!! Thanks a Ton!!! Paul.
Antonio T
Antonio T Jun 22
Thank you great job with `rows`' working on forum search topic I'm virtual kiss you !
Ash
Ash Jul 9
Hello All experts,


I also have got an another similar issue, when searching for a keyword the search does not gets performed on the title but searches the content..


Any help and inputs to how to make the search cover the topic title as well will be highly appreciated!


Note* I am useing mariaDB


Thanks in Advance

Cheers!