Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Gostaria de saber se é correto montar uma tabela desse jeito, senão qual a melhor maneira de relacionar a tabela das imagem com a tabela dos imóveis:
Uma tabela para os imóveis com as imagens:
CREATE TABLE IF NOT EXISTS imoveis_tb (
id_imovel bigint(20) NOT NULL, -----------------> qual o tipo mais indicado?
tipo char(30) NOT NULL, ------------------------> tem tabela independente
data_incl char(10) NOT NULL,
negocios varchar(40) NOT NULL,------------------------> tem tabela independente
foto char(10) NOT NULL,
foto1 char(100) NOT NULL,
foto2 char(100) NOT NULL,
foto3 char(100) NOT NULL,
foto4 char(100) NOT NULL,
foto5 char(100) NOT NULL,
zona varchar(15) NOT NULL,------------------------> tem tabela independente
bairro varchar(40) NOT NULL,------------------------> tem tabela independente
dorm varchar(15) NOT NULL, ------------------------> tem tabela independente
detalhes_imovel text NOT NULL,
valor_imovel float NOT NULL,
destaque enum('sim','nao') NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
As imagens são cadastradas através de formulário junto com as informações do imóvel, mas não sou eu que vou cadastrar, por isso estou perguntou para não ter problemas de cadastro da imagem.
Ex: http://maresiasimove...896&transacao=0
Carregando comentários...