Date: 01/10/00
- Next message: sylvan: "[PHPLIB-DEV] cvs commit"
- Next in thread: sylvan: "[PHPLIB-DEV] cvs commit"
- Maybe reply: sylvan: "[PHPLIB-DEV] cvs commit"
- Maybe reply: sylvan: "[PHPLIB-DEV] cvs commit"
- Maybe reply: uw: "[PHPLIB-DEV] cvs commit"
- Maybe reply: ssilk: "[PHPLIB-DEV] cvs commit"
- Maybe reply: ssilk: "[PHPLIB-DEV] cvs commit"
- Maybe reply: negro: "[PHPLIB-DEV] cvs commit"
- Maybe reply: kir: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Maybe reply: sylvan: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Maybe reply: chagenbu: "[PHPLIB-DEV] cvs commit"
- Maybe reply: kk: "[PHPLIB-DEV] cvs commit"
- Maybe reply: kk: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: sylvan
Date: Mon Jan 10 13:26:47 2000
Modified files:
php-lib/php/ct_informix.inc
php-lib/php/ct_split_sql.inc
php-lib/php/ct_sql.inc
php-lib/php/ct_sql_blob.inc
php-lib/php/ct_sql_compat.inc
php-lib/php/setup.inc
Log message:
Added the "p_" prefix to all table properties references that I found
Index: php-lib/php/ct_informix.inc
diff -u php-lib/php/ct_informix.inc:1.2 php-lib/php/ct_informix.inc:1.3
--- php-lib/php/ct_informix.inc:1.2 Fri Nov 12 08:11:24 1999
+++ php-lib/php/ct_informix.inc Mon Jan 10 13:26:14 2000
@@ -3,7 +3,7 @@
##
## Copyright (c) 1999 Daniel J. Lashua <djl <email protected>>
##
-## $Id: ct_informix.inc,v 1.2 1999/11/12 07:11:24 kk Exp $
+## $Id: ct_informix.inc,v 1.3 2000/01/10 12:26:14 sylvan Exp $
##
## PHPLIB Data Storage Container using an Informix Server
##
@@ -39,7 +39,7 @@
$timeout = time();
$sqldate = date("YmdHis", $timeout - ($gc_time * 60));
ifx_query(sprintf("DELETE FROM %s ".
- "WHERE changed < '%s' AND name = '%s'",
+ "WHERE p_changed < '%s' AND p_name = '%s'",
$this->database_table,
$sqldate,
$name),$this->linkid);
@@ -51,15 +51,15 @@
$blobid = ifx_create_blob(1,0,0);
$blobidary[] = $blobid;
ifx_update_blob($blobid,$str);
- $resid = <email protected>(sprintf("UPDATE %s SET val=?, changed='%s' ".
- "WHERE sid='%s' AND name='%s'",
+ $resid = <email protected>(sprintf("UPDATE %s SET p_val=?, p_changed='%s' ".
+ "WHERE p_sid='%s' AND p_name='%s'",
$this->database_table,
$now = date("YmdHis", time()),
$id,
$name),$this->linkid,$blobidary);
if(ifx_affected_rows($resid) == 0 &&
!ifx_query(sprintf("INSERT INTO %s " .
- " (sid,name,val,changed) " .
+ " (p_sid,p_name,p_val,p_changed) " .
"VALUES ".
"('%s','%s',?,'%s')",
$this->database_table,
@@ -73,7 +73,7 @@
function ac_delete($id, $name) {
ifx_query(sprintf("DELETE FROM %s ".
- "WHERE name = '%s' AND sid = '%s'",
+ "WHERE p_name = '%s' AND p_sid = '%s'",
$this->database_table,
addslashes($name),
$id),$this->linkid);
@@ -81,13 +81,13 @@
function ac_get_value($id, $name) {
ifx_textasvarchar(0);
- $resid = ifx_query(sprintf("SELECT val FROM %s ".
- "WHERE sid = '%s' AND name = '%s'",
+ $resid = ifx_query(sprintf("SELECT p_val FROM %s ".
+ "WHERE p_sid = '%s' AND p_name = '%s'",
$this->database_table,
addslashes($id),
addslashes($name)),$this->linkid);
if($data = <email protected>($resid)) {
- return ifx_get_blob($data["val"]);
+ return ifx_get_blob($data["p_val"]);
} else {
return "";
}
Index: php-lib/php/ct_split_sql.inc
diff -u php-lib/php/ct_split_sql.inc:1.5 php-lib/php/ct_split_sql.inc:1.6
--- php-lib/php/ct_split_sql.inc:1.5 Fri Nov 12 08:11:24 1999
+++ php-lib/php/ct_split_sql.inc Mon Jan 10 13:26:14 2000
@@ -3,7 +3,7 @@
## Copyright (c) 1999 Internet Images srl
## Massimiliano Masserelli
##
-## $Id: ct_split_sql.inc,v 1.5 1999/11/12 07:11:24 kk Exp $
+## $Id: ct_split_sql.inc,v 1.6 2000/01/10 12:26:14 sylvan Exp $
##
## PHPLIB Data Storage Container using a SQL database and multiple
## rows for each element
@@ -57,7 +57,7 @@
$timeout = time();
$sqldate = date("YmdHis", $timeout - ($gc_time * 60));
$this->db->query(sprintf("DELETE FROM %s ".
- "WHERE changed < '%s' AND name = '%s'",
+ "WHERE p_changed < '%s' AND p_name = '%s'",
$this->database_table,
$sqldate,
addslashes($name)));
@@ -81,7 +81,7 @@
$count = 0;
while ($part = substr($str, 0, $this->split_length)) {
$this->db->query(sprintf("INSERT INTO %s ".
- " (sid, name, valenc, valpos, val, changed) ".
+ " (p_sid, p_name, p_valenc, p_valpos, p_val, p_changed) ".
" VALUES ".
" ('%s','%s','%s', '%06d','%s','%s')",
$this->database_table,
@@ -111,23 +111,23 @@
function ac_delete($id, $name) {
$this->db->query(sprintf("DELETE FROM %s ".
- "WHERE name = '%s' AND sid = '%s'",
+ "WHERE p_name = '%s' AND p_sid = '%s'",
$this->database_table,
addslashes($name),
$id));
}
function ac_get_value($id, $name) {
- $this->db->query(sprintf("SELECT valenc, val, valpos FROM %s ".
- "WHERE sid = '%s' AND name = '%s' ".
- "ORDER BY valpos",
+ $this->db->query(sprintf("SELECT p_valenc, p_val, p_valpos FROM %s ".
+ "WHERE p_sid = '%s' AND p_name = '%s' ".
+ "ORDER BY p_valpos",
$this->database_table,
$id,
addslashes($name)));
$str="";
while ($this->db->next_record()) {
- $str .= $this->db->f("val");
- $enc = $this->db->f("valenc");
+ $str .= $this->db->f("p_val");
+ $enc = $this->db->f("p_valenc");
}
# get encoding method
Index: php-lib/php/ct_sql.inc
diff -u php-lib/php/ct_sql.inc:1.21 php-lib/php/ct_sql.inc:1.22
--- php-lib/php/ct_sql.inc:1.21 Fri Nov 12 08:11:24 1999
+++ php-lib/php/ct_sql.inc Mon Jan 10 13:26:14 2000
@@ -6,7 +6,7 @@
##
## Copyright (c) 1998,1999 Sascha Schumann <sascha <email protected>>
##
-## $Id: ct_sql.inc,v 1.21 1999/11/12 07:11:24 kk Exp $
+## $Id: ct_sql.inc,v 1.22 2000/01/10 12:26:14 sylvan Exp $
##
## PHPLIB Data Storage Container using a SQL database
##
@@ -57,7 +57,7 @@
function ac_gc($gc_time, $name) {
$timeout = time();
$sqldate = date("YmdHis", $timeout - ($gc_time * 60));
- $this->db->query(sprintf("DELETE FROM %s WHERE changed < '%s' AND name = '%s'",
+ $this->db->query(sprintf("DELETE FROM %s WHERE p_changed < '%s' AND p_name = '%s'",
$this->database_table,
$sqldate,
addslashes($name)));
@@ -72,7 +72,7 @@
$name = addslashes($name);
$now = date("YmdHis", time());
- $uquery = sprintf("update %s set valenc='%s', valpos='%s', val='%s', changed='%s' where sid='%s' and name='%s'",
+ $uquery = sprintf("p_update %s set p_valenc='%s', p_valpos='%s', p_val='%s', p_changed='%s' where p_sid='%s' and p_name='%s'",
$this->database_table,
$this->encoding_mode,
'000000',
@@ -80,7 +80,7 @@
$now,
$id,
$name);
- $iquery = sprintf("insert into %s ( sid, name, valenc, valpos, val, changed ) values ('%s', '%s', '%s', '%s', '%s', '%s')",
+ $iquery = sprintf("insert into %s ( p_sid, p_name, p_valenc, p_valpos, p_val, p_changed ) values ('%s', '%s', '%s', '%s', '%s', '%s')",
$this->database_table,
$id,
$name,
@@ -101,7 +101,7 @@
}
function ac_delete($id, $name) {
- $this->db->query(sprintf("delete from %s where name = '%s' and sid = '%s'",
+ $this->db->query(sprintf("delete from %s where p_name = '%s' and p_sid = '%s'",
$this->database_table,
addslashes($name),
$id));
@@ -111,12 +111,12 @@
$str = '';
$this->db->query( sprintf(
- "SELECT valenc, val FROM %s WHERE sid = '%s' AND name = '%s'",
+ "SELECT p_valenc, p_val FROM %s WHERE p_sid = '%s' AND p_name = '%s'",
$this->database_table, $id, addslashes($name)) );
if ( $this->db->next_record() ) {
- $enc = $this->db->f('valenc');
- $str = $this->db->f('val');
+ $enc = $this->db->f('p_valenc');
+ $str = $this->db->f('p_val');
# get encoding method
$cmd = $this->enc_methods[$enc]["dec"];
$str = $cmd($str);
Index: php-lib/php/ct_sql_blob.inc
diff -u php-lib/php/ct_sql_blob.inc:1.2 php-lib/php/ct_sql_blob.inc:1.3
--- php-lib/php/ct_sql_blob.inc:1.2 Fri Nov 12 08:11:24 1999
+++ php-lib/php/ct_sql_blob.inc Mon Jan 10 13:26:14 2000
@@ -7,7 +7,7 @@
## Copyright (c) 1999 Internet Image srl
## Massimiliano Masserelli <negro <email protected>>
##
-## $Id: ct_sql_blob.inc,v 1.2 1999/11/12 07:11:24 kk Exp $
+## $Id: ct_sql_blob.inc,v 1.3 2000/01/10 12:26:14 sylvan Exp $
##
## PHPLIB Data Storage Container using a SQL database and BLOB support
## as implemented by be_xxx classes.
@@ -58,7 +58,7 @@
function ac_gc($gc_time, $name) {
$timeout = time();
$sqldate = date("YmdHis", $timeout - ($gc_time * 60));
- $this->db->query(sprintf("DELETE FROM %s WHERE changed < '%s' AND name = '%s'",
+ $this->db->query(sprintf("DELETE FROM %s WHERE p_changed < '%s' AND p_name = '%s'",
$this->database_table,
$sqldate,
addslashes($name)));
@@ -69,12 +69,12 @@
$name = addslashes($name);
$now = date("YmdHis", time());
- $uquery = sprintf("update %s set changed='%s' where sid='%s' and name='%s'",
+ $uquery = sprintf("update %s set p_changed='%s' where p_sid='%s' and p_name='%s'",
$this->database_table,
$now,
$id,
$name);
- $iquery = sprintf("insert into %s ( sid, name, val, changed ) values ('%s', '%s', '%s', '%s')",
+ $iquery = sprintf("insert into %s ( p_sid, p_name, p_val, p_changed ) values ('%s', '%s', '%s', '%s')",
$this->database_table,
$id,
$name,
@@ -90,7 +90,7 @@
$bid = $this->blob->create();
$this->blob->write($bid, $str);
- $this->db->query(sprintf("update %s set val='%s' where sid='%s' and name='%s'",
+ $this->db->query(sprintf("update %s set p_val='%s' where p_sid='%s' and p_name='%s'",
$this->database_table,
$bid,
$id,
@@ -99,26 +99,26 @@
$ret = false;
}
} else {
- $this->db->query(sprintf("select val from %s where sid='%s' and name='%s'",
+ $this->db->query(sprintf("select p_val from %s where p_sid='%s' and p_name='%s'",
$this->database_table,
$id,
$name));
$this->db->next_record();
- $bid = $this->db->f("val");
+ $bid = $this->db->f("p_val");
$this->blob->write($bid, $str);
}
return $ret;
}
function ac_delete($id, $name) {
- $this->db->query(sprintf("select val from %s where name = '%s' and sid = '%s'",
+ $this->db->query(sprintf("select p_val from %s where p_name = '%s' and p_sid = '%s'",
$this->database_table,
addslashes($name),
$id));
$this->db->next_record();
- $bid = $this->db->f("val");
+ $bid = $this->db->f("p_val");
$this->blob->delete($bid);
- $this->db->query(sprintf("delete from %s where name = '%s' and sid = '%s'",
+ $this->db->query(sprintf("delete from %s where p_name = '%s' and p_sid = '%s'",
$this->database_table,
addslashes($name),
$id));
@@ -128,11 +128,11 @@
$str = '';
$this->db->query( sprintf(
- "SELECT val FROM %s WHERE sid = '%s' AND name = '%s'",
+ "SELECT p_val FROM %s WHERE p_sid = '%s' AND p_name = '%s'",
$this->database_table, $id, addslashes($name)) );
if ( $this->db->next_record() ) {
- $bid = $this->db->f('val');
+ $bid = $this->db->f('p_val');
$str = $this->blob->read($bid);
}
Index: php-lib/php/ct_sql_compat.inc
diff -u php-lib/php/ct_sql_compat.inc:1.2 php-lib/php/ct_sql_compat.inc:1.3
--- php-lib/php/ct_sql_compat.inc:1.2 Fri Nov 12 08:11:24 1999
+++ php-lib/php/ct_sql_compat.inc Mon Jan 10 13:26:14 2000
@@ -6,7 +6,7 @@
##
## Copyright (c) 1998,1999 Sascha Schumann <sascha <email protected>>
##
-## $Id: ct_sql_compat.inc,v 1.2 1999/11/12 07:11:24 kk Exp $
+## $Id: ct_sql_compat.inc,v 1.3 2000/01/10 12:26:14 sylvan Exp $
##
## PHPLIB Data Storage Container using a SQL database
##
@@ -59,7 +59,7 @@
function ac_gc($gc_time, $name) {
$timeout = time();
$sqldate = date("YmdHis", $timeout - ($gc_time * 60));
- $this->db->query(sprintf("DELETE FROM %s WHERE changed < '%s' AND name = '%s'",
+ $this->db->query(sprintf("DELETE FROM %s WHERE p_changed < '%s' AND p_name = '%s'",
$this->database_table,
$sqldate,
addslashes($name)));
@@ -84,13 +84,13 @@
global $HTTP_REFERER, $HTTP_USER_AGENT, $REMOTE_ADDR;
$now = date("YmdHis", time());
- $uquery = sprintf("update %s set val='%s', changed='%s' where sid='%s' and name='%s'",
+ $uquery = sprintf("update %s set p_val='%s', p_changed='%s' where p_sid='%s' and p_name='%s'",
$this->database_table,
$str,
$now,
$id,
$name);
- $iquery = sprintf("insert into %s ( sid, name, val, changed ) values ('%s', '%s', '%s', '%s')",
+ $iquery = sprintf("insert into %s ( p_sid, p_name, p_val, p_changed ) values ('%s', '%s', '%s', '%s')",
$this->database_table,
$id,
$name,
@@ -107,19 +107,19 @@
}
function ac_delete($id, $name) {
- $this->db->query(sprintf("delete from %s where name = '%s' and sid = '%s'",
+ $this->db->query(sprintf("delete from %s where p_name = '%s' and p_sid = '%s'",
$this->database_table,
addslashes($name),
$id));
}
function ac_get_value($id, $name) {
- $this->db->query(sprintf("select val from %s where sid = '%s' and name = '%s'",
+ $this->db->query(sprintf("select p_val from %s where p_sid = '%s' and p_name = '%s'",
$this->database_table,
$id,
addslashes($name)));
if ($this->db->next_record()) {
- $str = $this->db->f("val");
+ $str = $this->db->f("p_val");
$str2 = base64_decode( $str );
if ( ereg("^".$name.":.*", $str2) ) {
Index: php-lib/php/setup.inc
diff -u php-lib/php/setup.inc:1.1 php-lib/php/setup.inc:1.2
--- php-lib/php/setup.inc:1.1 Thu Aug 26 12:51:07 1999
+++ php-lib/php/setup.inc Mon Jan 10 13:26:14 2000
@@ -39,7 +39,7 @@
$tab = "session_stats";
$now = date("YmdHis", time());
-$query = sprintf("insert into %s ( name, sid, start_time, referer, addr, user_agent ) values ( '%s', '%s', '%s', '%s', '%s', '%s' )",
+$query = sprintf("insert into %s ( p_name, p_sid, p_start_time, p_referer, p_addr, p_user_agent ) values ( '%s', '%s', '%s', '%s', '%s', '%s' )",
$tab,
$sess->name,
$sess->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: sylvan: "[PHPLIB-DEV] cvs commit"
- Next in thread: sylvan: "[PHPLIB-DEV] cvs commit"
- Maybe reply: sylvan: "[PHPLIB-DEV] cvs commit"
- Maybe reply: sylvan: "[PHPLIB-DEV] cvs commit"
- Maybe reply: uw: "[PHPLIB-DEV] cvs commit"
- Maybe reply: ssilk: "[PHPLIB-DEV] cvs commit"
- Maybe reply: ssilk: "[PHPLIB-DEV] cvs commit"
- Maybe reply: negro: "[PHPLIB-DEV] cvs commit"
- Maybe reply: kir: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Maybe reply: sylvan: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Maybe reply: chagenbu: "[PHPLIB-DEV] cvs commit"
- Maybe reply: kk: "[PHPLIB-DEV] cvs commit"
- Maybe reply: kk: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Maybe reply: carmelo: "[PHPLIB-DEV] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

