bello
30.01.2006, 19:35:47
Hallo
Ich find den Wald vor Bäumen nicht!!!!!!!!
Fehlermeldung
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
if($_POST['company']=='' and $_POST['country']=='' and $_POST['city']=='' and $_POST['zipcode']==''){
$auswahl='';
}else{
$auswahl=" ";
if($_POST['company']!='')
{
$auswahl1="`company` LIKE '%".$_POST['company']."%'";
}
else
{
$auswahl1='';
}
if($_POST['country']!='')
{
if($_POST['company']!='')
{
$or1=" AND ";
}
else
{
$or1='';
}
$auswahl2=$or1."`country` LIKE '%".$_POST['country']."%'";
}else{
$auswahl2='';
}
if($_POST['city']!=''){
if($_POST['company']!=''||$_POST['country']!=''){
$or2=" AND ";
}else{
$or2='';
}
$auswahl3=$or2."`city` LIKE '%".$_POST['city']."%'";
}else{
$auswahl3='';
}
if($_POST['zipcode']!='')
{
if($_POST['company']!=''||$_POST['country']!=''||$_POST['city']!='')
{
$or3=" AND ";
}
else
{
$or3='';
}
$auswahl4=$or3."`zipcode` LIKE '%".$_POST['zipcode']."%'";
}
else
{
$auswahl4='';
}
$auswahl=$auswahl.$auswahl1.$auswahl2.$auswahl3.$auswahl4.")";
$ergebinis = "SELECT * FROM `mlsp`LEFT JOIN `customer` ON `mlsp`.`idcustomer` = `customer`.`customerid` WHERE `customer`. ".$auswahl."";
$sql = mysql_query($ergebinis) or die(mysql_error());
}
echo ausgabe.:
SELECT * FROM `mlsp` LEFT JOIN `customer` ON `mlsp`.`idcustomer` = `customer`.`customerid` WHERE `customer`. `company` LIKE '%Inmo Europe%')You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
vieleicht habe ich auch nur ein denkfehler.
Wäre für jeden Tipp Dankbar
Tino
Ich find den Wald vor Bäumen nicht!!!!!!!!
Fehlermeldung
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
if($_POST['company']=='' and $_POST['country']=='' and $_POST['city']=='' and $_POST['zipcode']==''){
$auswahl='';
}else{
$auswahl=" ";
if($_POST['company']!='')
{
$auswahl1="`company` LIKE '%".$_POST['company']."%'";
}
else
{
$auswahl1='';
}
if($_POST['country']!='')
{
if($_POST['company']!='')
{
$or1=" AND ";
}
else
{
$or1='';
}
$auswahl2=$or1."`country` LIKE '%".$_POST['country']."%'";
}else{
$auswahl2='';
}
if($_POST['city']!=''){
if($_POST['company']!=''||$_POST['country']!=''){
$or2=" AND ";
}else{
$or2='';
}
$auswahl3=$or2."`city` LIKE '%".$_POST['city']."%'";
}else{
$auswahl3='';
}
if($_POST['zipcode']!='')
{
if($_POST['company']!=''||$_POST['country']!=''||$_POST['city']!='')
{
$or3=" AND ";
}
else
{
$or3='';
}
$auswahl4=$or3."`zipcode` LIKE '%".$_POST['zipcode']."%'";
}
else
{
$auswahl4='';
}
$auswahl=$auswahl.$auswahl1.$auswahl2.$auswahl3.$auswahl4.")";
$ergebinis = "SELECT * FROM `mlsp`LEFT JOIN `customer` ON `mlsp`.`idcustomer` = `customer`.`customerid` WHERE `customer`. ".$auswahl."";
$sql = mysql_query($ergebinis) or die(mysql_error());
}
echo ausgabe.:
SELECT * FROM `mlsp` LEFT JOIN `customer` ON `mlsp`.`idcustomer` = `customer`.`customerid` WHERE `customer`. `company` LIKE '%Inmo Europe%')You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
vieleicht habe ich auch nur ein denkfehler.
Wäre für jeden Tipp Dankbar
Tino