Hello,
once again I've some informations to provide :
There were left other errors in the php/db/db.pinc :

in the getInsert(), getUpdate() and getSelect() functions which are used to 
construct mysql queries :
for the same reason, it's necessary to replace some mentions to $i by the backquoted 
version "`$i`"
to get :


  /**
   * get an INSERT query
   */
  function getInsert() {
    $flds = "(";
    $vals = "(";
    $pre = "";
    @reset($this->flds);
    while( list ($i,$f) = @each ($this->flds)) {
      $flds .= $pre ."`$i`";
      $vals .= $pre . $f;
      $pre = ",";
    }
    $flds .= ")";
    $vals .= ")";
    $q = "INSERT INTO ". $this->table ." ". $flds ." VALUES ". $vals;
    return $q;
  }
  /**
   * get an UPDATE query
   */
  function getUpdate() {
    $pre = " ";
    $q = "UPDATE ". $this->table ." SET ";
    @reset($this->flds);
    while( list ($i,$f) = @each ($this->flds)) {
      $q .= $pre . "`$i`" ." = ". $f;
      $pre = ",";
    }
    $pre = " WHERE ";
    @reset($this->wc);
    while( list ($i,$f) = @each ($this->wc)) {
      $q .= $pre ."(". "`$i`" ." = ". $f .")";
      $pre = " AND ";
    }
    return $q;
  }
  /**
   * get an SELECT query
   */
  function getSelect() {
    $q = "SELECT ";
    @reset($this->flds);
    while( list ($i,$f) = @each ($this->flds)) {
      $q .= $pre . "`$i`" ;
      $pre = ",";
    }
    $q .= " FROM " .  $this->table;
    $pre = " WHERE ";
    @reset($this->wc);
    while( list ($i,$f) = @each ($this->wc)) {
      $q .= $pre ."(". "`$i`" ." = ". $f .")";
      $pre = " AND ";
    }
    return $q;
  }





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to