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  »  show yes no but save 1 or 0

phpMyEdit General     show yes no but save 1 or 0
Post new topic   Reply to topic    
 
dianacastillo     Joined: 11 Jan 2011   Posts: 4  
Post Posted: 2011-01-11 11:23
Back to top  Reply with quote     

is there a way for the user to see yes or no as the options but it actually saves a 0 or 1 to the database?
thank you

 
doug     Joined: 10 Feb 2003   Posts: 1013   Location: Denver, Colorado (USA)
Post Posted: 2011-01-12 14:57
Back to top  Reply with quote     

Code:
$opts['fdd']['hidden'] = array(
  'default'    => 0,
  'input'      => '',
  'maxlen'     => 1,
  'name'       => 'Hidden',
  'options'    => 'ACPVD',
  'select'     => 'D',
  'sqlw'       => 'TRIM("$val_as")',
  'values2'    => array('0' => 'No', '1' => 'Yes'),
  'sort'       => true
);


$opts['fdd']['deleted'] = array(
  'default'    => 0,
  'input'      => '',
  'maxlen'     => 1,
  'name'       => 'Deleted',
  'options'    => 'ACP',
  'select'     => 'D',
  'sqlw'       => 'TRIM("$val_as")',
  'values2'    => array('0' => 'No', '1' => 'Yes'),
  'sort'       => true
);


 
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