inc/database.inc.php
changeset 55 a885f557678f
parent 47 ae140472d97c
child 67 2f8c29fc5e2e
--- a/inc/database.inc.php	Thu Dec 27 12:36:04 2007 +0000
+++ b/inc/database.inc.php	Sat Dec 29 14:42:34 2007 +0000
@@ -50,5 +50,18 @@
 /* erase info */
 $mysql_pass = $dsn = '';
 
+// Add support for regular expressions in both MySQL and PostgreSQL
+if ( $dbdsntype == "mysql" ) 
+{
+	$sql_regexp = "REGEXP";
+} 
+elseif ( $dbdsntype == "pgsql" ) 
+{
+	$sql_regexp = "~";
+}
+else
+{
+	error(_('Unknown database type in inc/config.inc.php.'));
+};
 
 ?>