Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. id name
  2. 1 abc
  3. 2 def
  4. 3 ghi
  5.  
  6. id id_product id_catalogue
  7. 1 2 1
  8. 2 3 2
  9.  
  10. id produt name value id_catalogue
  11. 1 abc false null
  12. 2 def checked 1
  13. 3 ghi false null
  14.  
  15. id produt name value id_catalogue
  16. 1 abc false null
  17. 2 def checked 1
  18. 3 ghi checked null
  19.  
  20. $this->datatables->select("frs.raison_sociale as fournisseur,f.titre as famille,sf.titre as sous_famille,p.attribut as attribut,p.pa_centrale as prix_achat,p.marge_centrale as marge_centrale,p.pa_magasin as pa_magasin,p.marge_magasin as marge_magsin,p.prix_ht_public as public_ht,p.prix_ttc_public as public_ttc,p.id as id
  21.  
  22. ,IF (cc.id_catalogue='".$id."', 'checked', FALSE) checked
  23.  
  24. ",FALSE)
  25. ->from('cat_produits p')
  26. ->where('p.suppr','0')
  27. ->join('fournisseurs frs','frs.id=p.id_fournisseur', 'left')
  28. ->join('cat_familles f','f.id=p.id_famille', 'left')
  29. ->join('cat_sous_familles sf','sf.id=p.id_sous_famille', 'left')
  30. ->join('cat_cat_produits cc','cc.id_produit=p.id','left')
  31. ->edit_column('id', '<input type="checkbox" name="produits[]" value="" id="ck_pdt_$1" class="check_ligne_pdt" $2>', 'id,checked');
  32.  
  33. missing cc.id_catalogue in select
  34.  
  35. IF (cc.id_catalogue='".$id."', 'checked', '') checked
  36.  
  37. IF (cc.id_catalogue='".$id."', 'checked', '') as checked
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement