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

This is what you call a component builder. I was able to master using this in a very short time and the resulting component works like a charm. Not just a basic component builder but a fully working component builder with forms fields tables all ready to go. You can make the list and item views to display in the front and back end. Also there is a great forum just starting to evolve and I'm sure this will grow very rapidly when you all realise how good this tool is.
Kevin (JED)

         

Get Started