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  »  Showing blank rather than 0 in a numeric field

phpMyEdit General     Showing blank rather than 0 in a numeric field
Post new topic   Reply to topic    
 
Topshed9     Joined: 14 Jan 2008   Posts: 34  
Post Posted: 2015-04-28 04:22
Back to top  Reply with quote     

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     Joined: 10 Feb 2003   Posts: 1013   Location: Denver, Colorado (USA)
Post Posted: 2015-04-28 14:55
Back to top  Reply with quote     

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     Joined: 14 Jan 2008   Posts: 34  
Post Posted: 2015-04-29 13:37
Back to top  Reply with quote     

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

Regards Roy..

 
doug     Joined: 10 Feb 2003   Posts: 1013   Location: Denver, Colorado (USA)
Post Posted: 2015-04-29 18:46
Back to top  Reply with quote     

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)

 
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