Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82273

Problem with the where condition which is not taken into account

$
0
0

Hello,

I have a problem with this code which runs fine but the conditions where not taken into account.
I tried multiple solutions. Always the same result.

product.supp is INT
product.archive is INT
I want to exclude all rows that are 1 for either

<?php
// DataTables PHP library
include( "../Editor-PHP-1.9.1/lib/DataTables.php" );

// Alias Editor classes so they are easy to use
use
    DataTables\Editor,
    DataTables\Editor\Field,
    DataTables\Editor\Format,
    DataTables\Editor\Mjoin,
    DataTables\Editor\Options,
    DataTables\Editor\Upload,
    DataTables\Editor\Validate,
    DataTables\Editor\ValidateOptions;
    
    
    
Editor::inst( $db, 'produit_prix' )
    ->field(
        Field::inst( 'produit_prix.produit_id' )
            ->options( Options::inst()
                ->table( 'produit' )
                ->value( 'id' )
                ->label( 'produit' )
            )
            ->validator( Validate::dbValues() ),
        Field::inst( 'produit_prix.prix' ),
        Field::inst( 'produit_prix.saison' ),
        Field::inst( 'produit_prix.last_update')
          ->setValue( date('c') )
          ->getFormatter( 'Format::date_sql_to_format', 'jS F Y' ),
        Field::inst( 'produit.produit' ),
        Field::inst( 'produit.supp' ),
        Field::inst( 'produit.archive' )
    )
    ->leftJoin('produit', 'produit.id', '=', 'produit_prix.produit_id')
    ->where('produit.supp', '1', '!=' )
    ->where('produit.archive', '1', '!=' )
    ->process($_POST)
    ->json();

Viewing all articles
Browse latest Browse all 82273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>