Date: 10/26/99
- Next message: Massimiliano Masserelli: "Re: [PHPLIB-DEV] cvs commit"
- Previous message: ak <email protected>: "Re: [PHPLIB-DEV] cvs commit"
- Next in thread: kk: "[PHPLIB-DEV] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: kir
Date: Tue Oct 26 15:34:07 1999
Modified files:
php-lib/php/ct_split_sql.inc
php-lib/php/db_oracle.inc
Log message:
Removed some warnings/errors for Debug mode in db_oracle code.
Reducing number of lines in ct_split_sql.inc.
Index: php-lib/php/ct_split_sql.inc
diff -u php-lib/php/ct_split_sql.inc:1.1 php-lib/php/ct_split_sql.inc:1.2
--- php-lib/php/ct_split_sql.inc:1.1 Tue Jul 20 13:34:49 1999
+++ php-lib/php/ct_split_sql.inc Tue Oct 26 15:33:36 1999
@@ -3,7 +3,7 @@
## Copyright (c) 1999 Internet Images srl
## Massimiliano Masserelli
##
-## $Id: ct_split_sql.inc,v 1.1 1999/07/20 11:34:49 negro Exp $
+## $Id: ct_split_sql.inc,v 1.2 1999/10/26 13:33:36 kir Exp $
##
## PHPLIB Data Storage Container using a SQL database and multiple
## rows for each element
@@ -62,14 +62,11 @@
function ac_store($id, $name, $str) {
$ret = true;
$str = base64_encode($str);
- $name = addslashes($name);
$now = date("YmdHis", time());
+
$this->db->query("BEGIN TRANSACTION");
- $this->db->query(sprintf("DELETE FROM %s WHERE ct_sid='%s' AND ct_name='%s'",
- $this->database_table,
- $id,
- $name
- ));
+ $this->ac_delete($id, $name);
+
$count = 0;
while ($part = substr($str, 0, $this->split_length)) {
$this->db->query(sprintf("INSERT INTO %s ".
@@ -78,7 +75,7 @@
" ('%s','%s','%06d','%s','%s')",
$this->database_table,
$id,
- $name,
+ addslashes($name),
$count++,
$part,
$now
Index: php-lib/php/db_oracle.inc
diff -u php-lib/php/db_oracle.inc:1.16 php-lib/php/db_oracle.inc:1.17
--- php-lib/php/db_oracle.inc:1.16 Tue Oct 26 12:54:02 1999
+++ php-lib/php/db_oracle.inc Tue Oct 26 15:33:37 1999
@@ -4,7 +4,7 @@
*
* Copyright (c) 1998,1999 Luis Francisco Gonzalez Hernandez
*
- * $Id: db_oracle.inc,v 1.16 1999/10/26 10:54:02 kk Exp $
+ * $Id: db_oracle.inc,v 1.17 1999/10/26 13:33:37 kir Exp $
*
*/
@@ -29,7 +29,7 @@
var $Errno = 0;
var $Error = "";
- var $ora_no_next_fetch=false;
+ var $no_next_fetch=false;
/* copied from db_mysql for completeness */
@@ -189,7 +189,7 @@
$this->halt("Invalid seek(): Position is cannot be handled by API.<BR>".
"Difference too big. Wanted: $pos Current pos: $this->Row");
}
- if ($Debug) echo "<BR>Debug: seek = $pos<BR>";
+ if ($this->Debug) echo "<BR>Debug: seek = $pos<BR>";
$this->Row=$pos;
}
@@ -287,7 +287,7 @@
## THIS FUNCTION IS UNSTESTED!
function affected_rows() {
- if ($Debug) echo "<BR>Debug: affected_rows=". ora_numrows($this->Query_ID)."<BR>";
+ if ($this->Debug) echo "<BR>Debug: affected_rows=". ora_numrows($this->Query_ID)."<BR>";
return ora_numrows($this->Query_ID);
}
@@ -311,7 +311,7 @@
ORA_parse($curs,$q);
ORA_exec($curs);
ORA_fetch($curs);
- if ($Debug) echo "<BR>Debug: num_rows=". ORA_getcolumn($curs,0)."<BR>";
+ if ($this->Debug) echo "<BR>Debug: num_rows=". ORA_getcolumn($curs,0)."<BR>";
return(ORA_getcolumn($curs,0));
} else {
$this->halt("Last Query was not a SELECT: $this->lastQuery");
@@ -319,7 +319,7 @@
}
function num_fields() {
- if ($Debug) echo "<BR>Debug: num_fields=". ora_numcols($this->Query_ID) . "<BR>";
+ if ($this->Debug) echo "<BR>Debug: num_fields=". ora_numcols($this->Query_ID) . "<BR>";
return ora_numcols($this->Query_ID);
}
-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.
- Next message: Massimiliano Masserelli: "Re: [PHPLIB-DEV] cvs commit"
- Previous message: ak <email protected>: "Re: [PHPLIB-DEV] cvs commit"
- Next in thread: kk: "[PHPLIB-DEV] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

