cvs: functable / protos.php
[email protected] ("Hartmut Holzgraefe")
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <cvshholzgra1125763000@cvsserver> |
hholzgra Sat Sep 3 11:56:40 2005 EDT
Modified files:
/functable protos.php
Log:
changed to use mini 'abstraction' layer
http://cvs.php.net/diff.php/functable/protos.php?r1=1.1&r2=1.2&ty=u
Index: functable/protos.php
diff -u functable/protos.php:1.1 functable/protos.php:1.2
--- functable/protos.php:1.1 Thu Oct 23 03:15:07 2003
+++ functable/protos.php Sat Sep 3 11:56:40 2005
@@ -57,12 +57,11 @@
function store_proto($version, $filename, $proto_line, $function, $proto, $comment) {
- echo "
-INSERT INTO proto$version
- SET function = '".mysql_escape_string($function)."'
- , proto = '".mysql_escape_string($proto)."'
- , proto_desc = '".mysql_escape_string($comment)."';
- ";
+ db_query("INSERT INTO proto$version
+ SET function = '".db_escape($function)."'
+ , proto = '".db_escape($proto)."'
+ , proto_desc = '".db_escape($comment)."';
+ ");
}
@@ -75,7 +74,9 @@
*/
// purge database
-mysql_query("TRUNCATE TABLE docfile");
+db_query("TRUNCATE TABLE proto3");
+db_query("TRUNCATE TABLE proto4");
+db_query("TRUNCATE TABLE proto5");
// get a file finder helper object
$find = new File_Find;
@@ -86,4 +87,4 @@
}
-?>
\ No newline at end of file
+?>