Php Filter Search Mysql

0

I have a MySQL database with several tables. Their name below:

  • Table: formacao
  • Table: idiomas
  • Table: usuarios

I need to filter information, eg:

The person wants the candidate who is a bricklayer, who knows English, who has a Degree.

  • Profession information is in the usuarios table.
  • The language information is in the idiomas table.
  • The education information, is in the table formacao

Here is my doubt. How to do a search that takes several tables?

Obs. In the usuarios table it has id and in the others it has idusuarios , the information that appears in the id appears in idusuarios .

Structure of the formacao table:

CREATE TABLE 'formacao' (
'idusuarios' int(255) NOT NULL,
'idformacao' int(255) NOT NULL,
'graudeformacao' varchar(255) NOT NULL,
'cursotecnico' varchar(255) NOT NULL,
'cursofaculdade' varchar(255) NOT NULL,
'situacao' varchar(255) NOT NULL,
'dataconclusao' varchar(50) NOT NULL,
'dia' varchar(50) NOT NULL,
'mes' varchar(50) NOT NULL,
'ano' varchar(50) NOT NULL,
'nomeinstituicao' varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Structure of the idiomas table:

CREATE TABLE 'idiomas' (
'idusuarios' int(255) NOT NULL,
'ididioma' int(255) NOT NULL,
'nomeidioma' varchar(100) NOT NULL,
'nivelidioma' varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Structure of the usuarios table:

CREATE TABLE 'usuarios' (
'id' int(255) NOT NULL,
'numerocir' varchar(30) NOT NULL,
'validadecir' varchar(20) NOT NULL,
'numpassaporte' varchar(100) NOT NULL,
'passvencimento' varchar(50) NOT NULL,
'categoria' varchar(20) NOT NULL,
'nomecompleto' text NOT NULL,
'email' varchar(255) NOT NULL,
'cpf' varchar(20) NOT NULL,
'senha' varchar(50) NOT NULL,
'datanascimento' varchar(30) NOT NULL,
'estadocivil' varchar(30) NOT NULL,
'sexo' varchar(20) NOT NULL,
'altura' varchar(20) NOT NULL,
'peso' varchar(20) NOT NULL,
'numerodabota' varchar(20) NOT NULL DEFAULT '0',
'nacionalidade' text NOT NULL,
'naturalidadeestado' text NOT NULL,
'naturalidadecidade' text NOT NULL,
'url' text NOT NULL,
'lembretedesenha' varchar(255) NOT NULL,
'fotorosto' varchar(255) NOT NULL,
'endcep' varchar(255) NOT NULL,
'endrua' varchar(255) NOT NULL,
'endnumero' varchar(200) NOT NULL,
'endcomplemento' text CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
'endbairro' text NOT NULL,
'endestado' text NOT NULL,
'endcidade' text NOT NULL,
'celular' varchar(255) NOT NULL,
'convencional' varchar(255) NOT NULL,
'convrecado' varchar(255) NOT NULL,
'convnomerecado' text NOT NULL,
'celrecado' varchar(255) NOT NULL,
'celnomerecado' text NOT NULL,
'numerodefilhos' varchar(20) NOT NULL DEFAULT '0',
'fumante' varchar(20) NOT NULL DEFAULT '0',
'idformacao' int(255) NOT NULL,
'idcursos' int(255) NOT NULL,
'idembarque' int(255) NOT NULL,
'idexperiencias' int(255) NOT NULL,
'ididiomas' int(255) NOT NULL,
'codigoadm' varchar(5) NOT NULL DEFAULT '0',
'moderacao' int(2) NOT NULL DEFAULT '0',
'codigoconfirma' varchar(255) NOT NULL,
'confirmarcaoemail' int(5) NOT NULL DEFAULT '0',
'reenvioemail' varchar(50) NOT NULL DEFAULT '0',
 'liberado' int(5) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    
asked by anonymous 05.10.2016 / 12:25

0 answers