finder

finder

am 17.07.2009 05:34:13 von Emiliano Boragina

------=_NextPart_000_0001_01CA0676.50B9EC70
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello=85 hello=85 and hello everyone=85

=20

I am sorry again to disturb this. I=92ve got this from a web:

=20

$sql =3D "SELECT buildings.*, city.* FROM buildings, city WHERE
buildings.idcity =3D city.id ";
if (isset($_POST['txtSearch']))=20
{
$sql .=3D " AND buildings.title LIKE '%" . $_POST['txtSearch'] . "%' =
";
if (intval($_POST['selCity']) > 0)=20
{
$sql .=3D " AND buildings.idcity =3D '" . =
intval($_POST['selCity']) .
"'";
}
}
$sql .=3D " ORDER BY city.name ASC";
$result =3D mysql_query($sql);

I dont understand if the second IF plus with the first IF or what, it =
means
the search is on buildings and city?

If I want to search more than one option I must tu add an IF like the
example for each extra option I want?

=20

Thanks a lot... And sorry all this...

+ =
_
// Emiliano Boragina _
// Dise=F1o & Comunicaci=F3n //////////////////
+ =
_
// emiliano.boragina@gmail.com /
// 15 40 58 60 02 ///////////////////////////
+ =
_

=20


------=_NextPart_000_0001_01CA0676.50B9EC70--