/[libdata]/trunk/include/xx_pgsql.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/include/xx_pgsql.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 39 by dpavlin, Thu Mar 4 21:42:17 2004 UTC revision 41 by dpavlin, Thu Mar 4 22:43:17 2004 UTC
# Line 42  function xx_errno() { Line 42  function xx_errno() {
42  }  }
43    
44  function xx_fetch_array ($rs) {  function xx_fetch_array ($rs) {
45          XXX_debug("xx_fetch_array row: ".$GLOBALS["xx_element_nr"]);          if ($GLOBALS["xx_element_nr $rs"] > pg_num_rows($rs)) {
46          $arr = @pg_fetch_array($rs, $GLOBALS["xx_element_nr"]);                  return;
47          $GLOBALS["xx_element_nr"]++;          }
48            XXX_debug("xx_fetch_array ($rs) row: ".$GLOBALS["xx_element_nr $rs"]);
49            $arr = @pg_fetch_array($rs, $GLOBALS["xx_element_nr $rs"]);
50            $GLOBALS["xx_element_nr $rs"]++;
51          return $arr;          return $arr;
52  }  }
53    
# Line 111  function xx_query($sql, $con = 0) { Line 114  function xx_query($sql, $con = 0) {
114    
115          $sql = preg_replace('/password\(([^\)]+)\)/is', 'md5(\\1)', $sql);          $sql = preg_replace('/password\(([^\)]+)\)/is', 'md5(\\1)', $sql);
116    
         $GLOBALS["xx_element_nr"] = 0;  
117          $GLOBALS["pg_last_sql"] = $sql;          $GLOBALS["pg_last_sql"] = $sql;
118    
119          XXX_debug("xx_query [transformed]: $sql");          XXX_debug("xx_query [transformed]: $sql");
120    
121          $ret = pg_query($con, $sql);          $ret = pg_query($con, $sql);
122            
123            $GLOBALS["xx_element_nr $ret"] = 0;
124    
125          $GLOBALS["pg_last_oid"] = pg_last_oid($ret);          $GLOBALS["pg_last_oid"] = pg_last_oid($ret);
126          if ($ret) {          if ($ret) {

Legend:
Removed from v.39  
changed lines
  Added in v.41

  ViewVC Help
Powered by ViewVC 1.1.26