Subversion Repositories phpLibraryV2

Rev

Rev 44 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 44 Rev 46
Line 552... Line 552...
552
          $query = "insert into $tablename (" . implode( ',',array_keys($fields) );
552
          $query = "insert into $tablename (" . implode( ',',array_keys($fields) );
553
          $query .= ") values (" . implode( ',', array_map( array($this, 'my_escape_string'), array_values( $fields ) ) );
553
          $query .= ") values (" . implode( ',', array_map( array($this, 'my_escape_string'), array_values( $fields ) ) );
554
          return "$query)";
554
          return "$query)";
555
       } // insertQuery
555
       } // insertQuery
556
       
556
       
-
 
557
      function insertValuesIntoQuery( $query, $values ) {
-
 
558
         foreach ( $values as $name => $value ) {
-
 
559
            $query = $this->search_replace_string($query, "<$name>", $value );
-
 
560
         }
-
 
561
         return $query;
-
 
562
      }
-
 
563
 
-
 
564
      function search_replace_string($string, $searchFor, $replaceWith ) {
-
 
565
         $string = str_replace ( $searchFor, $replaceWith, $string );
-
 
566
         return $string;
-
 
567
      }
-
 
568
   
557
 
569
 
558
            
570
            
559
 
571
 
560
   } // class DBQuery
572
   } // class DBQuery
561
 
573