Git Product home page Git Product logo

Comments (19)

fdelapena avatar fdelapena commented on May 27, 2024

I use this (updated):

$qb->andWhere($qb->expr()->gt('tblsolicitudes.cservId.cservPrice', '0'));

from datatablesbundle.

celvin avatar celvin commented on May 27, 2024

thanks for the response,
I'm getting the error:

FatalErrorException: Error: Call to undefined function Gestion\Bundle\ConsularBundle\Controller\Cobros\expr()

from datatablesbundle.

fdelapena avatar fdelapena commented on May 27, 2024

Oops, I mean $qb->expr()

from datatablesbundle.

celvin avatar celvin commented on May 27, 2024

thanks the expression works very well,
problem is, I want to filter using a column cservPrice from the table catservices related to tblsolicitudes by cservId

from datatablesbundle.

fdelapena avatar fdelapena commented on May 27, 2024

Are you using Doctrine ORM relationships (getting the entity manager) or plain DBAL for the QueryBuilder?

from datatablesbundle.

celvin avatar celvin commented on May 27, 2024

Doctrine ORM

from datatablesbundle.

fdelapena avatar fdelapena commented on May 27, 2024

Take a look to this thread or this.

from datatablesbundle.

celvin avatar celvin commented on May 27, 2024

Thanks,
I'm trying, but for a reason with the sg/datatablesbundle it sounds weird and I can't do it, I keep trying.

from datatablesbundle.

celvin avatar celvin commented on May 27, 2024

it could be nice.

from datatablesbundle.

stwe avatar stwe commented on May 27, 2024

There are now two callback types and a direct access to the query:

   // Callback example
    $function = function($qb)
    {
        $qb->andWhere("post.id < 5");
    };

    // Add the callback function as WhereResult
    //$query->addWhereResult($function);

    // Or add the callback function as WhereAll
    //$query->addWhereAll($function);

    // Or get the actual query
    $query->buildQuery();
    $qb = $query->getQuery();
    $qb->andWhere("comments.id  < 5");
    $query->setQuery($qb);
    return $query->getResponse(false);

    //return $query->getResponse();

from datatablesbundle.

fdelapena avatar fdelapena commented on May 27, 2024

Thanks stwe!

from datatablesbundle.

DrDJo avatar DrDJo commented on May 27, 2024

Hi, I'm filtering my results with a andWhere Query, the results are OK but not the pagination, which seems to be based on the global query.

Do you have this problem too ?

from datatablesbundle.

e-vural avatar e-vural commented on May 27, 2024

i agree @DrDJo . I have same problem. Full record show on pagination bar.

from datatablesbundle.

stwe avatar stwe commented on May 27, 2024

Add the callback function as WhereAll:

$function = function($qb)
{
    $qb->andWhere("post.id < 5");
};

$query->addWhereAll($function);

return $query->getResponse();

from datatablesbundle.

DrDJo avatar DrDJo commented on May 27, 2024

Hi stwe,

Thanks for your answer.
How can I give some parameter to the function ?
For example, a $postId param.

from datatablesbundle.

e-vural avatar e-vural commented on May 27, 2024

i try to open indexresultaction route but error undefined index:search
what is this?

from datatablesbundle.

stwe avatar stwe commented on May 27, 2024

open a new ticket with your problem. I need your datatables class and your
controller actions.
Am 03.07.2015 18:57 schrieb "emrevural20" [email protected]:

i try to open indexresultaction route but error undefined index:search
what is this?


Reply to this email directly or view it on GitHub
#60 (comment)
.

from datatablesbundle.

e-vural avatar e-vural commented on May 27, 2024

datatable works now but resutls route gives undefined index:search error. yesterday i saw database data
in this route as json format.

from datatablesbundle.

e-vural avatar e-vural commented on May 27, 2024

i need another help. How can i show my column as a link?

from datatablesbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.