Revision: 1116
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1116&view=rev
Author:   cimorrison
Date:     2009-06-15 20:23:39 +0000 (Mon, 15 Jun 2009)

Log Message:
-----------
Fixed a problem that was causing PostgreSQL databases to complain giving the 
error message "ERROR: column "private" is of type boolean but expression is of 
type integer HINT: You will need to rewrite or cast the expression".

Modified Paths:
--------------
    mrbs/trunk/web/mrbs_sql.inc

Modified: mrbs/trunk/web/mrbs_sql.inc
===================================================================
--- mrbs/trunk/web/mrbs_sql.inc 2009-05-28 22:23:30 UTC (rev 1115)
+++ mrbs/trunk/web/mrbs_sql.inc 2009-06-15 20:23:39 UTC (rev 1116)
@@ -176,8 +176,8 @@
                                $private)
 {
   global $tbl_entry;
-
-  $private = $private ? 1 : 0 ;
+ 
+  $private = $private ? "TRUE" : "FALSE";
   $name        = addslashes($name);
   $description = addslashes($description);
    
@@ -231,6 +231,7 @@
 {
   global $tbl_repeat;
 
+  $private = $private ? "TRUE" : "FALSE";
   $name        = addslashes($name);
   $description = addslashes($description);
 
@@ -238,15 +239,15 @@
   $sql_coln = array(); $sql_val = array();
 
   // Mandatory things:
-  $sql_coln[] = 'start_time';    $sql_val[] = $starttime;
-  $sql_coln[] = 'end_time';    $sql_val[] = $endtime;
-  $sql_coln[] = 'rep_type';    $sql_val[] = $rep_type;
+  $sql_coln[] = 'start_time'; $sql_val[] = $starttime;
+  $sql_coln[] = 'end_time';   $sql_val[] = $endtime;
+  $sql_coln[] = 'rep_type';   $sql_val[] = $rep_type;
   $sql_coln[] = 'end_date';   $sql_val[] = $rep_enddate;
-  $sql_coln[] = 'room_id';   $sql_val[] = $room_id;
-  $sql_coln[] = 'create_by';   $sql_val[] = '\''.$owner.'\'';
-  $sql_coln[] = 'type';      $sql_val[] = '\''.$type.'\'';
-  $sql_coln[] = 'private';      $sql_val[] = '\''.$private.'\'';
-  $sql_coln[] = 'name';      $sql_val[] = '\''.$name.'\'';
+  $sql_coln[] = 'room_id';    $sql_val[] = $room_id;
+  $sql_coln[] = 'create_by';  $sql_val[] = '\''.$owner.'\'';
+  $sql_coln[] = 'type';       $sql_val[] = '\''.$type.'\'';
+  $sql_coln[] = 'private';    $sql_val[] = $private;
+  $sql_coln[] = 'name';       $sql_val[] = '\''.$name.'\'';
 
   // Optional things, pgsql doesn't like empty strings!
   if (!empty($rep_opt))


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to