Browse code

Finde Kunden auch anhand von DOmains

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1214 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on10/01/2009 12:31:09
Showing1 changed files
... ...
@@ -44,6 +44,13 @@ function find_customers($string)
44 44
   while ($entry = mysql_fetch_assoc($result))
45 45
     $return[] = $entry['id'];
46 46
 
47
+  $result = db_query("SELECT kunde FROM kundendaten.domains WHERE kunde IS NOT NULL AND (
48
+                      domainname LIKE '%{$string}%' OR CONCAT_WS('.', domainname, tld) LIKE '%{$string}%'
49
+                      )");
50
+
51
+  while ($entry = mysql_fetch_assoc($result))
52
+    $return[] = $entry['kunde'];
53
+
47 54
   return $return;
48 55
 }
49 56