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  »  Major Bug: NULL values replaced by empty string

phpMyEdit General     Major Bug: NULL values replaced by empty string
Odoslať novú tému   Odpovedať na tému    
 
patricek_97     Založený: 21.11.2007   Príspevky: 5  
Príspevok Zaslal: 2007-12-03 16:48
Návrat hore  Odpovedať s citátom     

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     Založený: 29.12.2005   Príspevky: 44   Bydlisko: Rio de Janeiro - Brazil
Príspevok Zaslal: 2007-12-06 11:20
Návrat hore  Odpovedať s citátom     

Try this:

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


Best Regards,

_________________
---
Victor Zucarino
vffzbr at yahoo dot com dot br
 
patricek_97     Založený: 21.11.2007   Príspevky: 5  
Príspevok Zaslal: 2007-12-06 12:49
Návrat hore  Odpovedať s citátom     

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     Založený: 05.01.2008   Príspevky: 1  
Príspevok Zaslal: 2008-01-05 08:16
Návrat hore  Odpovedať s citátom     

zucarino Napísal:
Try this:

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




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


 
imi     Založený: 14.08.2008   Príspevky: 1  
Príspevok Zaslal: 2008-08-17 21:11
Návrat hore  Odpovedať s citátom     

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.

 
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