m3bik Posted May 5, 2009 Share Posted May 5, 2009 Not sure how well I can describe my situation, but I'll try... I'm trying to create a reminder program for myself (I forget a lot). I have a mysql table set up where it stores the hour it's supposed to remind me and the description of the reminder... I want to have some reminders with multiple hours, like it's supposed to remind me at "2,5,12". I can't just select the row where HOUR=2 because it has several other numbers in the same row, and I can't select the row where HOUR like '2' because then it might select the rows with 12 (which isn't 2). Is there a way I can select the rows where HOUR=2 and where HOUR has a 2 in the commas? Or do I have to just select the rows where HOUR like '2' and then sort through it with more code? Link to comment https://forums.phpfreaks.com/topic/156890-solved-select-in-a-comma-splice/ Share on other sites More sharing options...
Ken2k7 Posted May 5, 2009 Share Posted May 5, 2009 Read this topic - http://www.phpfreaks.com/forums/index.php/topic,250831.0.html What you have there is just *bad* DB design. Read up on DB normalization. Link to comment https://forums.phpfreaks.com/topic/156890-solved-select-in-a-comma-splice/#findComment-826498 Share on other sites More sharing options...
m3bik Posted May 5, 2009 Author Share Posted May 5, 2009 Ok, thanks. I'll admit I was being a bit lazy. I didn't want to have to create a new row for the same information, just a different time... But it looks like I'm headed in that direction. Link to comment https://forums.phpfreaks.com/topic/156890-solved-select-in-a-comma-splice/#findComment-826503 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.