Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[FIXED] Search Box -> msql_errors with quote in words 31 May 2012 13:01 #2453

  • liubov
  • liubov's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
when you enter a word with quote in the search box, query return mysql error, ie : liubov's
   //search_search : search on Nom du Chien
   $search_search = $this->getState('search.search');
   $this->_addSearch('search', ' a.dname', 'like');
   if (($search_search != '') && ($search_search_val = $this->_buildSearch('search', $search_search)))
   $where[] = $search_search_val;

return:
WHERE (a.dname LIKE '%liubov's%') ORDER BY a.dname
( ! ) Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in D:\wamp\www\Jbreeding2.5.0\libraries\joomla\database\database\mysqli.php on line 263

I saw the function _buildSearch in jmodel.list, but the $db->Quote("%%s%") does not seem to work with me.
I will check in the SandBox ...

Thx,

Marc

Please Log in or Create an account to join the conversation.

Last edit: by liubov.

Re: Search Box -> msql_errors with quote in words 01 Jun 2012 04:40 #2460

  • liubov
  • liubov's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
So I ran my component in the SandBox.

=> no msql error displayed, but result is null (no items) when I enter a word with a quote.
using word [liubov's] ...
In my Dogs managment Component, that might display all my breeding production.
If you can have a look ...

Thx

Please Log in or Create an account to join the conversation.

Last edit: by liubov.

Re: Search Box -> msql_errors with quote in words 26 Jun 2012 11:16 #2673

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Search Box -> msql_errors with quote in words 26 Jun 2012 12:20 #2680

  • liubov
  • liubov's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
Hi Joce!

I will paste the new code, (buildSearch function, I think) ...

Danke !
Marc.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.095 seconds
  I still don't believe he can really be human to do all this ! From all of the forums that I've ever participated in this is certainly the one that most encapsulates the feeling of being truly open source where everyone's opinions and contributions can and will shape the development of the service! It's truly awesome! Hope you enjoy cooking and look forward to reading and contributing to any of the editorial work that you proposed too!! Thanks
Gez (audibleid - JED)

Get Started