Changes between Initial Version and Version 4 of Ticket #7281


Ignore:
Timestamp:
Dec 4, 2008, 1:20:37 AM (13 years ago)
Author:
Nathan Toone
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7281

    • Property Owner changed from alex to Bryan Forbes
    • Property Component changed from TestFramework to DojoX Grid
    • Property Milestone changed from tbd to 1.3
  • Ticket #7281 – Description

    initial v4  
    66
    77You have to convert from json true/false (or in this case <empty>) to mysql 1/0. 
    8 
    9 Here is my version:
    10 
    11         function getPostColumns() {
    12                 $columns = getColumns();
    13                 $nCount = count($columns);
    14                 $a=array();
    15                 for ($i=0; $i < $nCount; $i++) {               
    16                         $p=getPostString("_".$i);                       
    17                         $r = new stdClass();
    18                         $r->name = $columns[$i]->Field;                 
    19                         $r->value = ($columns[$i]->Type == "tinyint(1)" ? ($p ? 1 : 0) :$p);                   
    20                         echo "$r->name" . "<br \>";
    21                         $a[] = $r;
    22                 }       
    23                 return $a;             
    24         }