Jump to content
Larry Ullman's Book Forums

emilg1984

Members
  • Content Count

    12
  • Joined

  • Last visited

Community Reputation

0 Neutral

About emilg1984

  • Rank
    Newbie
  1. I want to delete it for a smaller digital footprint.
  2. My account on this website that allows me to post on the forums.
  3. Thank you HartleySan! It always surprises me how helpful your answers are. Keep up the good work!
  4. It does now. So the combination of user_id and course_id is a unique index, and there's no primary key in users_courses, right? By the way, why wouldn't you create a join in your query? Is it just for simplicity's sake?
  5. I'm having difficulties understanding how a intermediary table works. The example on page 168 makes sense and is simple to understand (the books and authors example), but when I tried to apply it to my design it didn't work out. This is my intended design: I have a 'users' table. Each user has a course/s that he's taking, 'course_id.' The name of the course is in the 'courses' table, and the intermediary table is 'users_courses.' I want to extract the 'user_id' together with the 'course_name.' users: user_id (pk) users_courses: user_id (pk) course_id courses: course_id (pk) course_name Is this the right way to go? It doesn't make sense to me, because I can't enter multiple values for the same user in a case where he's taking more than one course since it's going to create duplicate keys. How do I make it work?
  6. Yes, a thread is created when a user creates a new topic. And no, the threads aren't messages. Thanks for your help! Much appreciated.
  7. Too bad... I'm stuck at understanding how to modify the example to regular forums. I know I should drop the 'words' table, but where do I go from there? Do I just change the drop-down menu of the languages to a list of forums' names and then modify the code? It seems quite complex.
  8. I was wondering if there is an example from Larry's other books that explains how to create a regular forum (like the ones here) instead of the forum with the languages and words in chapter 17.
  9. I don't understand why Larry uses this specific regex example to find spaces in a string if it can only work for a single character (and it is "space" in the example). Using stropos() makes much more sense. Thanks for the help Antonio and HartleySan, much appreciated.
  10. Page 444 example 3: I don't understand why the regular expression of checking if a string contains no spaces doesn't work for me. This works fine and prints TRUE: $pattern = '/^\S$/'; $subject = 'a'; But this prints FALSE: $pattern = '/^\S$/'; $subject = 'aa'; It doesn't have any spaces, so why is it FALSE?
×
×
  • Create New...