note 98380 added to function.date
| From: | narciscomas at yahoo dot es | Date: | Fri, 11 Jun 2010 15:15:17 +0000 |
| Subject: | note 98380 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-170062@lists.php.net to get a copy of this message | ||
hi amios i have a problem and i need your help please
im woring to create a online booing hoteles but i get a problem en datediff i can no have a result
for easch price between two dates
example:
that my table:
CREATE TABLE
precio (
id_hotel varchar(5) COLLATE latin1_general_ci NOT NULL,
check_in date NOT NULL,
check_out date NOT NULL,
precio double(5,2) NOT NULL,
KEY precio (precio)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
--
-- Volcar la base de datos para la tabla precio
--
INSERT INTO precio (id_hotel, check_in,
check_out, precio) VALUES
('3', '2010-04-13', '2010-05-19', 23.32),
('5', '2010-06-16', '2010-06-22', 30.50),
('5', '2010-06-23', '2010-06-30', 50.00),
('8', '2010-04-12', '2010-06-03', 60.23),
('5', '2010-05-13', '2010-06-15', 100.22),
('5', '2010-06-08', '2010-06-12', 22.50);
my query is flowen:
<?php
$query = "SELECT * FROM precio JOIN hombre WHERE precio.check_in AND precio.check_out BETWEEN
'".$txtDate."' AND '".$chekDate."' AND precio.id_hotel =
hombre.id_hotel AND precio.precio = precio.precio GROUP BY precio.check_in ";
$result = mysql_query($query, $GLOBALS['DB']);
?>
and my result it :
price for only row inmy table.
please i look arounde all blogs and foros and i can't finde samething
thanks
----
Server IP: 69.147.83.197
Probable Submitter: 80.58.205.100 (proxied: 88.10.245.222)
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/98380
Del: integrated -- https://master.php.net/note/delete/98380/integrated
Del: useless -- https://master.php.net/note/delete/98380/useless
Del: bad code -- https://master.php.net/note/delete/98380/bad+code
Del: spam -- https://master.php.net/note/delete/98380/spam
Del: non-english -- https://master.php.net/note/delete/98380/non-english
Del: in docs -- https://master.php.net/note/delete/98380/in+docs
Del: other reasons-- https://master.php.net/note/delete/98380
Reject -- https://master.php.net/note/reject/98380
Search -- https://master.php.net/manage/user-notes.php