note 98380 rejected from function.date by danbrown

From: Date: Fri, 11 Jun 2010 15:16:02 +0000
Subject: note 98380 rejected from function.date by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-170063@lists.php.net to get a copy of this message
Note Submitter: narciscomas at yahoo dot es ---- 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

« previous php.notes (#170063) next »