0
I want to make a select
for a search of five fields (position, training, sex, schedule, photography). But it is not working.
Could someone tell me why?
<?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) {
...
}
?>
Separating by commas post, training, schedule etc.. does not work?
– Wellington Avelino
I figured it out. I traded the OR for AND.
– Fernanda Ferreira
Put your answer to other people
– Wellington Avelino