Jump to content

[MySql] Need to get all rows with a date field as selector


flaab

Recommended Posts

Hi =)

 

I'm building an application and I need to SELECT a bunch of rows WHERE date is < today.

 

I tried like this but it does not work.

 

SELECT id FROM `reserva` WHERE fh_salida < '$today' AND (estado = 'P' OR estado = 'C')

 

I mean i need all rows where the date field called fh_salida is before that TODAY.

 

How can i do that?

 

Thx.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.