Link to home
Start Free TrialLog in
Avatar of pc-buddy
pc-buddy

asked on

Mysqli Query

Hi,

I have a column in my data base called end_date, there could be 2 data types in this column

2016-01-01

or it could be simply

0000-00-00

My query looks like this

"SELECT room_id FROM child_room WHERE child_id='".$id."' AND end_date > ".$today." Or end_date = '0000-00-00'"

Open in new window


There are multipul entris in the DB for each child so I need the current used row for that child.

The query fails.

Can you see whats wrong

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pc-buddy
pc-buddy

ASKER

Thanks all, helped a lot
You are welcome.