Forum Moderators: coopster
As you can see the days between is * by the price in precio_baja column,
What I want to do is to use the same to_days to get how many days there are without doing another select.
Something like this:
THEN sum(precio_baja) * (TO_DAYS('$salida') - TO_DAYS('$llegada') as days) AS price ELSE NULL END),
THEN sum(precio_baja) * (TO_DAYS('$salida') - TO_DAYS('$llegada')) AS price AND (TO_DAYS('$salida') - TO_DAYS('$llegada')) as days ELSE NULL END),
So far only gets errors