Jump to content


Photo

consulta em 3 tabelas usando php

Mysql Consulta Php tabela multiplas

  • Faça o login para participar
6 replies to this topic

#1 Lucas99

Lucas99

    Normal

  • Usuários
  • 84 posts
  • Sexo:Masculino
  • Localidade:Santos

Posted 16/06/2015, 03:26

Tenho 3 tableas no mysql:

 

1º CADASTRO com 3 campos.

cod,nome,cpf

 

2º ENDERECO com 4 campos.

rua, numero, bairro, cpf

 

3ºO.S com 4 campos.

valor, serviço,data , cpf

 

Bom como pudemos notar uso o fpc para ligar os dados com a tabela cadastro

 

Minha dúvida é, preciso fazer uma consulta de todos os cadastros que não tem o registro na tabela ENDERECO e O.S

 


#2 dery

dery

    Novato no fórum

  • Usuários
  • 23 posts
  • Sexo:Masculino
  • Localidade:Sumaré-/sp

Posted 16/06/2015, 10:46

É só usar o LEFT JOIN ao invés do INNER JOIN para linkar as tabelas.

 

SELECT * FROM cadastro c

LEFT JOIN endereco e ON c.cpf = e.cpf

LEFT JOIN os o ON c.cpf = o.cpf

 

Espero ter ajudado. Boa sorte



#3 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 26/09/2017, 07:55

Priligy Phase Iii Finasteride Avidart Propecia Amoxicillin Making Me Feel Spacy cialis Cialis Ayuda
Online Pharmacies In Canada buy cialis Cialis Original Comprar Online Viagra Pharmacy Cialis 20mg Lilly Kaufen
Coconut online pharmacy Propecia Hiperplasia Prostatica How To Order Amoxicillin Online
Wholesale Generic Viagra cialis Lasix Poland

#4 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 26/09/2017, 22:13

Levitra Alla Menta Immagini Kamagra Buy Accutane In Usa cialis Prix Levitra Generique

#5 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 25/10/2017, 20:36

Buy Brand Valtrex Amoxicillin Vs Doxycycline Cialis Super Active Vs Cialis viagra Trazodone 50 Mg On Sale Secure Doryx
Amoxicillin By Vbulletin Intitle View Profile Buy Antibiotics Online In Uk viagra Wirkung Von Viagra Bodybuilding

#6 JeffMalm

JeffMalm

    Super Veterano

  • Usuários
  • 12254 posts
  • Sexo:Feminino
  • Localidade:Mount Carey

Posted 04/12/2022, 05:24

clomiphene citrate 50 mg men I called my doctor s office, told the nurse how I felt and she said to go off of it for 3 weeks to see if it s not a virus

#7 JeffMalm

JeffMalm

    Super Veterano

  • Usuários
  • 12254 posts
  • Sexo:Feminino
  • Localidade:Mount Carey

Posted 13/01/2023, 22:34

Optimal lipid levels were defined as LDL cholesterol LDL C 50 mg dL, non HDL C Conclusions Among high risk women, few attained the AHA s standards for all lipid fractions, and only one third received recommended drug therapy, highlighting significant opportunities to apply evidence based recommendations to manage lipid abnormalities in high risk women buy clomid for men online Friend35 rUbUoBnlfRgVUQlJzn 6 27 2022
cheap cialis generic online Immunocytochemical analysis of differentiated EGFP neurospheres generated from hypoxic cortex
What you won t find is dozens of guys that look like bodybuilders and that reason is the diet cheap cialis no prescription
If you re sick, you make an appointment to see a doctor, right levitra 10 mgf orodispersible
1993, 26 43 49 buy z pack over the counter Congrats thank you for sharing your beautiful story shinning a light of hope for us





Veja alguns posts relacionados com: Mysql, Consulta, Php, tabela, multiplas

1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq