[PHPLIB-DEV] cvs commit From: ssilk (phplib-dev <email protected>)
Date: 02/01/00

From: ssilk
Date: Wed Feb 2 03:33:39 2000
Modified files:
      php-lib/php/query_sql.inc

Log message:
Slight change for more comfort while calling...

Index: php-lib/php/query_sql.inc
diff -u php-lib/php/query_sql.inc:1.10 php-lib/php/query_sql.inc:1.11
--- php-lib/php/query_sql.inc:1.10 Wed Feb 2 00:59:01 2000
+++ php-lib/php/query_sql.inc Wed Feb 2 03:33:08 2000
@@ -9,7 +9,7 @@
  * is based in November 1997,
  * it was a collection of functions for PHP/FI and mSQL.
  *
- * $Id: query_sql.inc,v 1.10 2000/02/01 23:59:01 ssilk Exp $
+ * $Id: query_sql.inc,v 1.11 2000/02/02 02:33:08 ssilk Exp $
  *
  */
 
@@ -241,7 +241,10 @@
         }
 
         ##
- ## This function is nearly the same, as insert_plain_Clause,
+ ## This function is nearly the same, as insert_plain_Clause. Some
+ ## difference:
+ ## $special: If $special is a string and $where is empty,
+ ## it takes it as $where-Parameter
         ## The where parameter is new and should be generated by yourself
         ## The check parameter knows 3 values: strong, soft and weak
         ## weak enables you to sent a query without $where (enables you
@@ -249,6 +252,10 @@
         ##
         function update_plain_Clause ($table,$fields,$special='',$where='',$check="soft") {
                 if (''==$special) $special=ARRAY();
+ if (is_String($special) && ''==$where) {
+ $where=$special;
+ $special=ARRAY();
+ }
                 $meta=$this->metadata_buffered($table);
                 if (!$where && $check!="weak") {
                         echo "ERROR: update_plain_Clause(): Parameter \$where is empty!<BR>";
@@ -283,14 +290,21 @@
 
 
         ##
- ## This function is nearly the same, as insert_Clause,
- ## The where parameter is new and should be generated by yourself
+ ## This function is nearly the same, as insert_Clause, but some
+ ## differences:
+ ## $special: If $special is a string and $where is empty,
+ ## it takes it as $where-Parameter
+ ## The where parameter should be generated by yourself
         ## The check parameter knows 3 values: strong, soft and weak
         ## weak enables you to sent a query without $where (enables you
         ## to update the hole table)
         ##
         function update_Clause ($table,$fields,$special='',$where='',$check="soft") {
                 if (''==$special) $special=ARRAY();
+ if (is_String($special) && ''==$where) {
+ $where=$special;
+ $special=ARRAY();
+ }
                 $meta=$this->metadata_buffered($table);
                 if (!$where && $check!="weak") {
                         echo "ERROR: update_Clause(): Parameter \$where is empty!<BR>";

-
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.