Revision 13da4432
Von Holger Lindemann vor fast 14 Jahren hinzugefügt
lxo-import/import_lib.php | ||
---|---|---|
253 | 253 |
if (!$rs) { |
254 | 254 |
$org=$data; |
255 | 255 |
while(strpos($data," ")>0) { |
256 |
$data=ereg_replace(" "," ",$data);
|
|
256 |
$data=str_replace(" "," ",$data);
|
|
257 | 257 |
} |
258 | 258 |
$data=preg_replace("/[^A-Z0-9]/ ",".*",trim($data)); |
259 | 259 |
$sql="select * from $tab where upper(name) ~ '$data'"; |
... | ... | |
275 | 275 |
$sql="select id from $tabelle where upper(".$tabelle."number) = '$nummer'"; |
276 | 276 |
$rs=$db->getAll($sql); |
277 | 277 |
if (!$rs) { |
278 |
$nr=ereg_replace(" ","%",$nummer);
|
|
278 |
$nr=str_replace(" ","%",$nummer);
|
|
279 | 279 |
$sql="select id,".$tabelle."number from $tabelle where upper(".$tabelle."number) like '$nr'"; |
280 | 280 |
$rs=$db->getAll($sql); |
281 | 281 |
if ($rs) { |
282 |
$nr=ereg_replace(" ","",$nummer);
|
|
282 |
$nr=str_replace(" ","",$nummer);
|
|
283 | 283 |
foreach ($rs as $row) { |
284 |
$tmp=ereg_replace(" ","",$row[$tabelle."number"]);
|
|
284 |
$tmp=str_replace(" ","",$row[$tabelle."number"]);
|
|
285 | 285 |
if ($tmp==$nr) return $row["id"]; |
286 | 286 |
} |
287 | 287 |
} else { |
Auch abrufbar als: Unified diff
Noch ein wenig veraltet