How to merge these 2 selects
?
MY TABLES
EVENT TITLE DESCRIPTION CATEGORY_ID
CATEGORY NAME COLOR ICON DESCRIPTION
this select below works perfectly makes the count right I need to do the same without count on the other two selects
SELECT category.*,(SELECT COUNT(*) FROM event
WHERE category_id = category.id)as total FROM category
I've tried it this way
"SELECT category.* FROM event WHERE category_id = 4)
FROM category ORDER BY MONTH(date_at)DESC "
In the other Table
SELECT * FROM event WHERE DATE(date_at) = CURDATE()
"SELECT category.* FROM event WHERE category_id = 5)
FROM category ORDER DATE(date_at) = CURDATE() "
I was able to do this
SELECT *, color
FROM event , category
WHERE event.id = event.category_id ;
So I could not place WHERE DATE (date_at) = CURDATE ()
Someone?