git.schokokeks.org
Repositories
Help
Report an Issue
webinterface.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
baa8199
Branches
Tags
master
ticket
webinterface.git
modules
crm
include
crm.php
some AJAX test
bernd
commited
baa8199
at 2008-09-18 15:49:23
crm.php
Blame
History
Raw
<?php require_once('inc/base.php'); function find_customer($string) { $string = mysql_real_escape_string(chop($string)); $return = array(); $result = db_query("SELECT id FROM kundendaten.kunden WHERE ". "firma LIKE '%{$string}%' OR firma2 LIKE '%{$string}%' OR ". "nachname LIKE '%{$string}%' OR vorname LIKE '%{$string}%' OR ". "adresse LIKE '%{$string}%' OR adresse2 LIKE '%{$string}%' OR ". "ort LIKE '%{$string}%' OR pgp_id LIKE '%{$string}%' OR ". "notizen LIKE '%{$string}%';"); while ($entry = mysql_fetch_assoc($result)) $return[] = $entry['id']; $result = db_query("SELECT kundennr FROM kundendaten.kundenkontakt WHERE ". "wert LIKE '%{$string}%' OR name LIKE '%{$string}%';"); while ($entry = mysql_fetch_assoc($result)) $return[] = $entry['kundennr']; return $return; }