Update of /cvsroot/phpvortex/phpvortex
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24422
Modified Files:
FT_Base.class.php FT_Text.class.php
Log Message:
Added the member function Where() to FT_*
Index: FT_Text.class.php
===================================================================
RCS file: /cvsroot/phpvortex/phpvortex/FT_Text.class.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FT_Text.class.php 29 Sep 2004 19:37:18 -0000 1.1
--- FT_Text.class.php 4 Oct 2004 18:08:24 -0000 1.2
***************
*** 89,92 ****
--- 89,103 ----
return TRUE;
}
+
+ /**
+ * Format the field for a WHERE clause.
+ *
+ * @param string $field The data from the field to be formated.
+ * @return string Returns the formated field.
+ */
+ function Where(&$field)
+ {
+ return "{$this->name_db} LIKE '%".$this->db->AddSlashes($field)."%'";
+ }
}
Index: FT_Base.class.php
===================================================================
RCS file: /cvsroot/phpvortex/phpvortex/FT_Base.class.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** FT_Base.class.php 1 Oct 2004 20:50:52 -0000 1.7
--- FT_Base.class.php 4 Oct 2004 18:08:24 -0000 1.8
***************
*** 187,190 ****
--- 187,201 ----
return "'".$this->db->AddSlashes($field)."'";
}
+
+ /**
+ * Format the field for a WHERE clause.
+ *
+ * @param string $field The data from the field to be formated.
+ * @return string Returns the formated field.
+ */
+ function Where(&$field)
+ {
+ return "{$this->name_db} = ".$this->ConsistFormat($field);
+ }
}
|