homepage Welcome to WebmasterWorld Guest from 54.161.133.166
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Replace that wont work on the fly
Topshed71




msg:4572286
 11:18 am on May 9, 2013 (gmt 0)

Hello,

I am using Playton phpmyedit for my data files and I cannot get a simple replace to work on the screen output\
I am trying to get a blank/NULL instead of a '0'

the code for one numeric entry is as follows..


$opts['fdd']['build_no'] = array(
'default' => '',
'help|ACP' => 'Limit 8 characters',
'input' => '',
'maxlen' => 8,
'name' => 'Build #',
'options' => 'ACPVDFL',
'select' => 'T',
'size' => 8,
'sqlw' => 'TRIM("$val_as")',
'sort' => true
);


I have tried replacing the SQLW line with

'sqlw' => 'IF($val_qas = 0, NULL, $val_qas)',

But it does not work

 

lucy24




msg:4572452
 7:30 pm on May 9, 2013 (gmt 0)

Obvious first question: What is the prior history of
$val_as
? Have you tried explicitly converting it to a string?

Or $val_qas as the case may be (assuming a typo in the post).

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved