New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching in grid with value 0 is not working #442

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@binaryelites
Copy link

binaryelites commented Feb 27, 2018

If we search using value 0 in the filter section, the search field is ignored as
empty("0") will always return true

Searching in grid with value 0 is not working
If we search using value 0 in the filter section, the search field is ignored as 
empty("0") will always return true
@portapipe

This comment has been minimized.

Copy link
Contributor

portapipe commented Feb 27, 2018

I think all the search has to be reviewed.
I’ll talk with @scoumbourdis about this, because there is issues with the date too, plus some advanced stuff can solve some stuff, like dropdown for dropdowns, checkbox for tinyint and so on... first I’ll release it on my fork that we use for test stuff (see the last implemented clone function) and we’ll see if everything is fine how to implement successfully in the master branch.
Anyway I'll add this to my branch.

@scoumbourdis

This comment has been minimized.

Copy link
Owner

scoumbourdis commented Feb 28, 2018

I did the commit d2f71fb that actually fixes that but as @portapipe is saying this is an issue with all the numeric values that rather searching by the exact number, it is basically searching for with like that it is usually not the desirable outcome

@portapipe

This comment has been minimized.

Copy link
Contributor

portapipe commented Feb 28, 2018

I think @scoumbourdis we/I can rework on the search code, so we can think to implement stuff like join/select.

@scoumbourdis

This comment has been minimized.

Copy link
Owner

scoumbourdis commented Feb 28, 2018

I think the best temporary solution for now is the implementation that I have in enterprise version. For example:

 = (for equal)
 > (for greater than)
 >= (for greater than or equal)
 < (for lower than)
 <= (for lower than)

For example the string "=100" will search only for 100 and NOT 1100,21002... e.t.c. This will be really useful for dates as well. I have to be honest, I don't have too much time to spend on this so I think for now it is a good solution. What do you think?

P.S. Still struggling to find time for the join, select implementation :)

@portapipe

This comment has been minimized.

Copy link
Contributor

portapipe commented Feb 28, 2018

I was thinking about making some little changes like use “fore%” to create a ‘LIKE “fore%” ‘ to search “forest” as “foreign” and so on... for numbers if you search a number you’ll search the like, but if you add =, ><.... is what you said.
I think is the best we can get now and is useful for the community edition :)
It’s better to have 1 strange solution instead of not having one :)

I don’t think this will keep lots of work, I’m having a little hard time at work but as soon as I’ll have time I can make these changes.
We have to take a look at the multiple search too. ATM if you search multiple columns it mess a bit, plus if you have a premade filter it reset the main “where”.

It’s only me and my fork?

BTW I think we’ll find some time for the join select with these fixes because the code is near. I mean “phisically” near.

@scoumbourdis

This comment has been minimized.

Copy link
Owner

scoumbourdis commented Mar 2, 2018

I will do then the fastest possible. I have to be honest. I don't know when I will find the time to do it. For transparency, I am creating a new video with title: Which PHP Framework is best for you? (2018 update). Many people are asking me about it so I thought a video answer with some presentation will be cool :)

@portapipe

This comment has been minimized.

Copy link
Contributor

portapipe commented Mar 2, 2018

Please don’t put Laravel and Symfony... they’re destroying the PHP web simplicity.
Every project that I’ve work with was a mess! Twig and that stuff are so limitating... plus it’s more complex to work with these framework that work with plain PHP!
Just my opinion... I can show you all that I’m saying! ;)
BTW if you want to create it I can help. I’m on Skype as always :)

@scoumbourdis

This comment has been minimized.

Copy link
Owner

scoumbourdis commented Mar 2, 2018

I was thinking to create first the video in youtube. I had in mind to also have a small podcast with you like this: https://www.youtube.com/watch?v=zq_2vaP_TDo&ab_channel=groceryCRUD (but with better quality now that I know how to do it) so we can discuss our opinion about them. I definitely wanted your opinion on that :) So far I have those frameworks (I am having them alphabetically ordered). These are all the frameworks that I have experience and I will create the video:

  • Codeigniter
  • Laravel
  • Phalcon
  • Slim framework
  • Symfony
  • Zend Framework 2
  • and finally I am reviewing the way to not choose any PHP framework whatsoever and just work with composer packages.

Have in mind that Grocery CRUD Enteprise ( a product that is live 1+ years now) is using mainly libraries of Zend Framework 2 and Symfony and I didn't have any big issues so far :)

@portapipe

This comment has been minimized.

Copy link
Contributor

portapipe commented Mar 2, 2018

That's fine for me.
A big shot should be to explain how to use composer libraries without using composer.
Lots of people are making libraries just for composer while lots of people hate it or just can't use it.
For example I have a huge old project in zend+symfony that use composer.
I have php 5.3 and we can't update it because of risk of breaking stuff (99% sure that an upgrade will break lots of stuff and my client payed that platform €+400k (not to me :P) ) and composer is one of the main problem.
The main issue is that if you have 2 libraries, both must be updated to support the same stuff BUT if you develop something that support my library.. let me do an example: you use my 1.0 api php5 in your 1.0 library, then I update my api library to 2.0 php7 and you support it in your 1.1 php5 library, composer in php5 server will update yours but not mine, breaking all the stuff. You can't have control over that, and the bigger is the project, the bigger is the problem.
This is a HUGE issue, so why don't explain how to use composer libraries without using the risks of composer? (just an idea)

@scoumbourdis

This comment has been minimized.

Copy link
Owner

scoumbourdis commented Mar 2, 2018

Hey @portapipe I will keep this for the discussion that we will have in person then ;-)

@portapipe

This comment has been minimized.

Copy link
Contributor

portapipe commented Mar 2, 2018

@scoumbourdis sure :) Meanwhile we're gonna check the search stuff... I'm having issues too ATM.

@scoumbourdis

This comment has been minimized.

Copy link
Owner

scoumbourdis commented Nov 17, 2018

Closing this pull request as this is now solved with the commit: d2f71fb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment