Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Štvrtok, 26. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Showing blank rather than 0 in a numeric field

phpMyEdit General     Showing blank rather than 0 in a numeric field
Odoslať novú tému   Odpovedať na tému    
 
Topshed9     Založený: 14.01.2008   Príspevky: 34  
Príspevok Zaslal: 2015-04-28 04:22
Návrat hore  Odpovedať s citátom     

I have been struggling with this for some time and I thought I had cracked it with the opts at the bottom of this code:-

$opts['fdd']['br_no'] = array(
'default' => ' ',
'help|ACP' => 'Limit 5 digits',
'input' => '',
'maxlen' => 5,
'name' => 'BR#',
'options' => 'VFL',
'select' => 'T',
'required' => false,
'size' => 5,
'sqlw' => 'TRIM("$val_as")',
'sort' => true
);
$opts['fdd']['br_no']['sql|LF'] = 'if(br_no = "0", " ", br_no)';

Which works as I require

However add a similar line to a second field and I get this error

"Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"


I do not understand why ?????

Puzzled Roy....

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2015-04-28 14:55
Návrat hore  Odpovedať s citátom     

Probably a typo in the similar line, which I don't see posted. Turn debugging on so you can see the failed query and copy, paste it here also.

 
Topshed9     Založený: 14.01.2008   Príspevky: 34  
Príspevok Zaslal: 2015-04-29 13:37
Návrat hore  Odpovedať s citátom     

Hi Doug,
Thanks for your reply, but how do I turn on debugging mode please

Regards Roy..

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2015-04-29 18:46
Návrat hore  Odpovedať s citátom     

Use your text editor to Search in the class file for the word debug

one of the function calls contains $debug = 0 and you can temporarily set it to 1 in the function call

default
function myquery($qry, $line = 0, $debug = 0)

temporary
function myquery($qry, $line = 0, $debug = 1)

 
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