Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  IF($val_qas not working as expected

phpMyEdit General     IF($val_qas not working as expected
Odoslať novú tému   Odpovedať na tému    
 
Topshed9     Založený: 14.01.2008   Príspevky: 34  
Príspevok Zaslal: 2010-10-15 03:08
Návrat hore  Odpovedať s citátom     

Hi yet again,

Using PHP5 and mysql401

I am struggling with IF($val_qas

I have NUM fields in a table where many records contain a zero, and I am Trying to make the list display a blank instead of a 0
I have tried two ways to get this to work, but both of them only work on the very first record in the table.
Do I need to somehow make this recursive perhaps ?

Kód:

$opts['fdd']['br_no'] = array(
  'name'     => 'B.R. No.',
  'select'   => 'T',
  'maxlen'   => 5,
  'sort'     => true,
  'sqlw'     => 'IF($val_qas = 0 , NULL, $val_qas)'
);
$opts['fdd']['renum'] = array(
  'name'     => '1946 No.',
  'select'   => 'T',
  'maxlen'   => 4,
  'sort'     => true,
  'sqlw'     => 'IF($val_qas = "0" , NULL, $val_qas)'

);


Either version of the code produces the same result

Is there something I am missing here ?

Thanks
Roy

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov