I want to make a select
for a search of five fields (job title, training, sex, schedule, photo). But it's not working.
Could someone tell me the reason?
<?php
$cargo = $_POST['cargo'];
$formacao = $_POST['formacao'];
$sexo = $_POST['sexo'];
$horario = $_POST['horario'];
$fotografia = $_POST['fotografia'];
$sql = mysql_query("SELECT * FROM tbl_cadastro_curriculo WHERE ((cargo LIKE '%".$cargo."%') OR (formacao LIKE '%".$formacao."%') OR (sexo LIKE '%".$sexo."%')
OR (sexo LIKE '%".$sexo."%') OR (horario LIKE '%".$horario."%') OR (fotografia LIKE '%".$fotografia."%')) LIMIT ".$ini.",".$fim);
if ($sql && mysql_num_rows($sql) > 0) {
...
}
?>