phpScheduleIt
May 19, 2013, 05:36:18 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Default field value 0 not null.  (Read 891 times)
Azyrus
Newbie
*

Karma: 0
Posts: 28


« on: April 20, 2012, 12:13:08 AM »

Hello everyone, looking forward to contributing to this fantastic project!

I've added a custom field to the reservations page however the default value for the field is 0, I want it to be empty.

Does anyone have any ideas on how to set the default value? The default value in phpmyadmin is NULL. I think something in the .php is writing it out as 0 though...?
Logged
Azyrus
Newbie
*

Karma: 0
Posts: 28


« Reply #1 on: April 20, 2012, 01:51:32 AM »

I found it out through adding another field. If anyone else needs help with this:

edit reservation.class.php,

example:
change below:
var $environment = 0;            //
to this:
var $environment = null;            //
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #2 on: April 23, 2012, 01:31:21 PM »

Thanks for sharing!
Logged
callten061
Newbie
*

Karma: 0
Posts: 3


« Reply #3 on: August 01, 2012, 06:46:37 AM »

same problem... thanks
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #4 on: August 06, 2012, 01:53:50 PM »

Is this the value that is stored when the user doesn't enter anything?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!