Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Sunday, October 18, 2026
About Us
O nás
Magazine
Magazín
Open Source
Otvorený softvér
CVS
CVS
Services
Služby
Index  »  Projects  »  phpMyEdit  »  Forum  »  IF($val_qas not working as expected

phpMyEdit General     IF($val_qas not working as expected
Post new topic   Reply to topic    
 
Topshed9     Joined: 14 Jan 2008   Posts: 34  
Post Posted: 2010-10-15 03:08
Back to top  Reply with quote     

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 ?

Code:

$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

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Odkazový formulár · Application form · Prihláška
Report bug on PLATON.SK website · Upozorniť na chybu na PLATON.SK webstránke · Terms of use · Podmienky použitia · Privacy policy · Ochrana osobných údajov