finder

------=_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



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



$sql =3D "SELECT buildings.*, city.* FROM buildings, city WHERE
buildings.idcity =3D city.id ";
if (isset($_POST['txtSearch']))
{
$sql .=3D " AND buildings.title LIKE '%" . $_POST['txtSearch'] . "%' =
";
if (intval($_POST['selCity']) > 0)
{
$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?



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

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




------=_NextPart_000_0001_01CA0676.50B9EC70--
Emiliano Boragina [ Fr, 17 Juli 2009 05:34 ] [ ID #2009015 ]
PHP » gmane.comp.php.database » finder

Vorheriges Thema: finder
Nächstes Thema: html input element rendering html entities