Welcome Guest, Not a member yet? Register   Sign In
sql NOT BETWEEN operator
#1

[eluser]fnbhns[/eluser]
Hi.. All.

I am new in Codeigniter, I need your kind support for the NOT BETWEEN operator sql code. I know the BTWEEN,

BETWEEN
Code:
->where('pickup_date >=',$sess['pickup_date'] )
->where('pickup_date <=',$sess['return_date'] )

But now i need the NOT BETWEEN, Need your help, if you show me any example code and looking forward. Thank you in Advance.
#2

[eluser]CroNiX[/eluser]
See the manual for db::where()
http://ellislab.com/codeigniter/user-gui...ecord.html
Code:
->where('pickup_date NOT BETWEEN ' . $sess['pickup_date'] . ' AND ' . $sess['return_date'], NULL, FALSE)
#3

[eluser]fnbhns[/eluser]
Hi.. CroNiX

Thank you so much for your so quick support. Its really became so helpful.

But the DATE should be in single quotation ( ' ') that is (NOT BETWEEN ' 2014/05/06 06:00 ')
How can i put this single quotation here please. Sorry for such a quesiton.

Thank you once again for your support.
#4

[eluser]fnbhns[/eluser]
Hi.. CroNiX

I already solved the problem. Thank you so much, for your help i done so quickly.
Code:
->where('pickup_date NOT BETWEEN "' .$sess['pickup_date'] . '" AND "' . $sess['return_date'].'"',NULL, FALSE)





Theme © iAndrew 2016 - Forum software by © MyBB