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.444 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started