Jump to content

RIkStryker

Members
  • Posts

    10
  • Joined

  • Last visited

RIkStryker's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks all, worked like a charm (and learning every day). Pete
  2. Thanks, and yes that has come up. Barand's solution almost does the job. I know the format is the issue so I now need to check the format. i.e. 1. Check first if column InputDate has a value and value is not default (00/00/0000), if so, proceed... 2. Grab parts of the InputDate, slicing by slashes and ensuring padding is cool. Thanks again for the input, I'll update with any findings. Pete
  3. Whoah, thanks for the answers - gonna give these a proper read thru and I'll let you know my results. Pete
  4. Hi All, I have 'inherited' a project where the database / dates are a bit screwed up. I have been handed a simple table with the column titles... RecordId InputDate MySqlDate (which i added) The id is the id, the InputDate unfortunately is a tinytext where the input format is for example... 20/08/2013 or 20/8/2013 I have added the MySqlDate as a date column to make everything easier for new entries / queries and all is good. Now I need to convert / update the existing data from the InputDate column to the respective MySqlDate column. i.e. from the tinytext to date - 0000-00-00 Got me stumped. Any tips appreciated. Rik
  5. Thanks for the suggestions. Obviously I am now using the proper database and column names. I've currently got... SELECT DISTINCT * FROM users INNER JOIN attendances ON database.id = attendances.RespondentID LEFT JOIN events ON attendances.EventID = events.EventID AND events.ModID = 57 WHERE events.EventID IS NULL GROUP BY users.id ORDER BY `date_updated` desc LIMIT 0,50 Which seems to be working apart from one thing. If a user has attended an event by the particular moderator and an another event by another moderator, it still appears on the list of result. I.e. if they attended an event by ModID=57, they should be removed from the list regardless of if they have attended an event with another ModID. This is getting curiouser and curiouser! Rik
  6. Thanks very much, Ill give it a shot. Rik
  7. Its a WordPress site which uses two plugins - Your Members and Participants Database. I was brought in hook them together and add extra admin search criteria - which was all good and is done. Then the client asks for this functionality and I hit my MySQL limit!
  8. I was planning on using just the course date.
  9. Actually it's a favour for a friends' new business. Everything is done apart from this darn query which has got me banging my head against the wall!
  10. Hi All, Wondering in anyone can assist me with a couple of queries which have cropped up in a project. The project is a database of people and their attendance of training courses. There are a few tables... Users (with UserID and Username) Teachers (with TeacherID and TeacherName) Courses (with CourseID, CourseName, CourseDate and TeacherID) - this one relates to which teacher took which course Attendances (with UserID and CourseID) - this one relates which user attended which course What the client is after is firstly selecting all the users who have NOT attended a specific teachers' courses. In other words, if the have been on a course with the specified teacher, they will not be shown. Secondly, the client wants the same query as the first but also limiting it to the last 6 months. In other words, selecting all the users who have NOT attended a specific teachers' courses within the last six months. This one has got me a bit baffled so any assistance would be appreciated. Rik
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.