phpbar.de logo

Mailinglisten-Archive

[php] What's wrong with this implode / array / mysql-querry ??

[php] What's wrong with this implode / array / mysql-querry ??

Dieter Hansen php_(at)_phpcenter.de
Tue, 20 Nov 2001 23:00:09 +0100


What's wrong with this implode / array / mysql-querry =3F=3F=20

>From an html site i get the following variables
zimmermulreg bezirkmul: Usually string arrays from a multiselect-field
 qmvon, qmbis, mietebis: string

   if ( $mietebis =3D=3D '') {$mietebis=3D'1000000';}; =20
   if ( $qmvon =3D=3D '') {$qmvon=3D'-1';};
   if ( $qmbis =3D=3D '') {$qmbis=3D'1000000';};
  $result =3D MysqlQuery( "SELECT * FROM $db=5Fangebotetabelle WHERE (( (" . i=
mplode("', '" , $zimmermulreg) . ") =3D=3D '') OR ($db=5Fangebotetabelle.zimmerz=
ahl IN ('" . implode("', '" , $zimmermulreg) . "') )) AND (( (" . implode(=
 "', '" , $bezirkmul) . ") =3D=3D '') OR ($db=5Fangebotetabelle.bezirk IN ('" . =
implode( "', '" , $bezirkmul) . "') )) AND ($db=5Fangebotetabelle.groesse BE=
TWEEN $qmvon AND $qmbis) AND ($db=5Fangebotetabelle.miete <=3D $mietebis) ORDE=
R BY bezirk, zimmerzahl, groesse" );=20

Which does result in:
--
Warning: Bad arguments to implode() in admin/search.php3 on line 19

Warning: Bad arguments to implode() in admin/search.php3 on line 19

Warning: Bad arguments to implode() in admin/search.php3 on line 19

Warning: Bad arguments to implode() in admin/search.php3 on line 19
Bei der Abfrage: "SELECT * FROM angebotetable WHERE (( () =3D=3D '') OR (angeb=
otetable.zimmerzahl IN ('') )) AND (( () =3D=3D '') OR (angebotetable.bezirk I=
N ('') )) AND (angebotetable.groesse BETWEEN 0 AND 5555) AND (angebotetabl=
e.miete <=3D 3652269) ORDER BY bezirk, zimmerzahl, groesse" ist folgender Fe=
hler aufgetreten:
You have an error in your SQL syntax near ') =3D=3D '') OR (angebotetable.zimm=
erzahl IN ('') )) AND (( () =3D=3D '') OR (angeboteta' at line 1
Warning: 0 is not a MySQL result index in admin/search.php3 on line 21

--
You could try the search and look at the html-code for the user if you wan=
t at:

http://www.tageskurier.de/search=5Fvermietungsangebote.htm


THANK you very much in advance
Dieter Hansen
DmyDmy_(at)_dieterhansen.de
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Berufsunf=E4higskeitversicherung von Mamax bei WEB.DE.=20
Jetzt informieren! http://bu.web.de



php::bar PHP Wiki   -   Listenarchive