🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.php
Article #166

Buscar registros

#166
From: Gabi
Date: Mon, 15 Dec 2008 13:07
17 lines
1625 bytes
Tengo un buscador con dos input text de nombre fecha_1 y fecha_2 para
introducir entrada y salida para la reserva de un apartamento.
Las tablas a buscar son ficha y diasreservados esta �ltima con la misma id
para todos los registros de fechas ocupadas que la tabla ficha donde est� el
apartamento.
Mi consulta es:
 $fecha_1=$_POST["fecha_1];
 $fecha_2=$_POST["fecha_2];
pagi_sql = "SELECT * FROM ficha INNER JOIN diasreservados ON
ficha.id=diasreservados.id WHERE
diasreservados.diasReservado<=date($fecha_1) AND
diasreservados.diasReservado>=date($fecha_2) ORDER BY ficha.id ASC " or die
(mysql_error());
 Pero s�lo me saca un registro cuando hay muchos m�s
Una ayuda por favor
Gracias
Gabi
Technical Details
Message-ID: <gi5kqp$913$1@aioe.org>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.newsland.it!aioe.org!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 107579,8b1c569aec9ef5fb,start
X-Google-Attributes: gid107579,domainid0,public,usenet
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.newsland.it!aioe.org!not-for-mail
From: "Gabi" <begabi@telefonica.net>
Newsgroups: es.comp.lenguajes.php
Subject: Buscar registros
Date: Mon, 15 Dec 2008 14:07:34 +0100
Organization: Aioe.org NNTP Server
Lines: 20
Message-ID: <gi5kqp$913$1@aioe.org>
NNTP-Posting-Host: 2vNEWo9Up0FRKdIarYurrg.user.aioe.org
X-Complaints-To: abuse@aioe.org
NNTP-Posting-Date: Mon, 15 Dec 2008 13:07:37 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-RFC2646: Format=Flowed; Original
X-Notice: Filtered by postfilter v. 0.7.6
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
Cancel-Lock: sha1:8s0TN2ogVMel1kdSpKw854Ys4/8=
X-Priority: 3
X-MSMail-Priority: Normal