Welcome Guest, Not a member yet? Register   Sign In
Selecting between a date
#1

[eluser]E303[/eluser]
I was able to run this query in phpMySQLAdmin but when it comes to getting CI to run the query nothing seems to work.

Code:
$sql = 'SELECT * FROM `exhibitions` WHERE \'2008-06-27\' BETWEEN `date` AND `endDate`';

Where you see 2008-06-27 I want to place todays date...

eg
Code:
$today = date("Y-m-d");


I get errors either there is no column called '2008-06-27' or like at the moment I don't get any results back.

Thank in advance


Messages In This Thread
Selecting between a date - by El Forum - 06-27-2008, 01:14 AM
Selecting between a date - by El Forum - 06-27-2008, 01:32 AM
Selecting between a date - by El Forum - 06-27-2008, 01:46 AM
Selecting between a date - by El Forum - 06-27-2008, 01:46 AM
Selecting between a date - by El Forum - 06-27-2008, 01:49 AM
Selecting between a date - by El Forum - 06-27-2008, 02:10 AM
Selecting between a date - by El Forum - 06-27-2008, 10:29 AM
Selecting between a date - by El Forum - 06-27-2008, 10:38 AM
Selecting between a date - by El Forum - 06-27-2008, 11:50 AM
Selecting between a date - by El Forum - 06-27-2008, 12:46 PM
Selecting between a date - by El Forum - 06-30-2008, 09:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB