Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Full text search problems

Status
Not open for further replies.

etrain01

MIS
Jan 16, 2003
1
US
I have a application I am doing dealing with a lunch/breakfast scanner for a school district. Students are only allowed to eat one meal a day. The problem is that right now they can eat as many as they want. I have a field "history" that keeps track of when they ate. ei "Ate breakfast on 01-16-2003" would be an entry and the next day would be concat on to it. I have my php script do a match() against() on history and it returns fine for the first student if they try and have another breakfast/lunch. But when you get more students in it doesn't work at all. I believe it has to do with the 50% threshold, because breakfast and lunch will be in every line. Is there a way around this because I can not move up to version 4.01 because it is beta...

Thanks for any help,
etrain01
 
I don't see where you would need MySQL 4.

The business rule in your question is ambiguous. I'm assuming that a student can have at most 1 breakfast and at most 1 lunch in any particular day.

I'd add two datetime columns to the student record table, named "last_breakfast", and "last_lunch".

When the student attempts to buy a breakfast, the software checks that the datetime in last_breakfast is before the current date. If it is, it processes the records for the meal and updates the student's record. Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top