Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Major Bug: NULL values replaced by empty string

phpMyEdit General     Major Bug: NULL values replaced by empty string
Post new topic   Reply to topic    
 
patricek_97     Joined: 21 Nov 2007   Posts: 5  
Post Posted: 2007-12-03 16:48
Back to top  Reply with quote     

Editing a row replaces any fields having a NULL values by empty string ("").

I believe this is a major because we well know NULL and "" are not the same thing.

Did you notice this bug too?

BTW, I tried to post a bug report (http://opensource.platon.sk/projects/bug_report_advanced_page.php?project_id=5) but got:

Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 24 bytes) in /home/platon/public_html/platon.sk/lib2/mantis/core/database_api.php on line 110

 
zucarino     Joined: 29 Dec 2005   Posts: 44   Location: Rio de Janeiro - Brazil
Post Posted: 2007-12-06 11:20
Back to top  Reply with quote     

Try this:

Code:
$opts['fdd']['col_name']['sqlw'] = 'IF($val_qas = "", NULL, $val_qas)';


Best Regards,

_________________
---
Victor Zucarino
vffzbr at yahoo dot com dot br
 
patricek_97     Joined: 21 Nov 2007   Posts: 5  
Post Posted: 2007-12-06 12:49
Back to top  Reply with quote     

I believe this is not totally valid. This code will use NULL if var = "". The idea is to leave the original value whaetever it is: "" or NULL.

 
motomouth     Joined: 05 Jan 2008   Posts: 1  
Post Posted: 2008-01-05 08:16
Back to top  Reply with quote     

zucarino wrote:
Try this:

Code:
$opts['fdd']['col_name']['sqlw'] = 'IF($val_qas = "", NULL, $val_qas)';




I successfully used
Code:
$opts['fdd']['col_name']['sqlw'] = 'IF($val_qas = "NULL", NULL, $val_qas)';


 
imi     Joined: 14 Aug 2008   Posts: 1  
Post Posted: 2008-08-17 21:11
Back to top  Reply with quote     

I think this thread applies to the solution I'm looking for, but being such a newb I haven't been able to get it to work correctly.

I'm using 'URLdisp' to display the word "Download" and 'URL' to link to an .mp3 audio file. However, if I don't provide a link to an audio file the word "Download" is still displayed when having nothing at all displayed would be preferable.

$opts['fdd']['AUDIO'] = array(
'name' => 'LECTURE NOTES',
'select' => '',
'maxlen' => 200,
'URLdisp' => 'Download',
'URL' => 'http://$value',
'sort' => true
);

I tried inserting
'sqlw' = 'IF($val_qas = "NULL", NULL, $val_qas)';

and then tried this,

$opts['fdd']['AUDIO'] ['sqlw'] = array(
'IF($val_qas = "NULL", NULL, $val_qas)',
'name' => 'LECTURE NOTES',
'select' => '',
'maxlen' => 200,
'URLdisp' => 'Download',
'URL' => 'http://$value',
'sort' => true
);

but neither worked.... any help would be appreciated.

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy