[TEP-COMMIT] CVS: catalog/catalog/includes/functions database.php,1.22,1.23
cvs-OfajU3CKLf1/[email protected] Mon, 16 Feb 2004 08:30:31 +0100
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /pack/cvsroots/oscommerce/catalog/catalog/includes/functions
In directory sunsite.dk:/tmp/cvs-serv16284
Modified Files:
database.php
Log Message:
use the new database class
Index: database.php
===================================================================
RCS file: /pack/cvsroots/oscommerce/catalog/catalog/includes/functions/database.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- database.php 2003/12/28 22:29:13 1.22
+++ database.php 2004/02/16 07:23:32 1.23
@@ -30,25 +30,14 @@
return mysql_close($$link);
}
- function tep_db_error($query, $errno, $error) {
+ function tep_db_error($query, $errno, $error) {
die('<font color="#000000"><b>' . $errno . ' - ' . $error . '<br><br>' . $query . '<br><br><small><font color="#ff0000">[TEP STOP]</font></small><br><br></b></font>');
}
-
- function tep_db_query($query, $link = 'db_link') {
- global $$link;
-
- if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
- error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
- }
-
- $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());
- if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
- $result_error = mysql_error();
- error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
- }
+ function tep_db_query($query) {
+ global $osC_Database;
- return $result;
+ return $osC_Database->simpleQuery($query);
}
function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') {
@@ -126,11 +115,13 @@
function tep_db_input($string, $link = 'db_link') {
global $$link;
+/*
if (function_exists('mysql_real_escape_string')) {
return mysql_real_escape_string($string, $$link);
} elseif (function_exists('mysql_escape_string')) {
return mysql_escape_string($string);
}
+*/
return addslashes($string);
}
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click