Jump to content
Larry Ullman's Book Forums


  • Posts

  • Joined

  • Last visited

MikeMikeMike's Achievements


Newbie (1/14)



  1. It`s fairly obvious to me who was likely snooping for my private information, but there`s no point naming names because they`d just deny it. It`s obvious to me because the person must have read the post I did last week about SSL, where I posted the link to the site, and then, this week, they remembered that I had posted the link there once they became curious about me following the mildly testy exchanges in the threads this week where Larry claimed Matt had posted the correct answer, and I refused to acknowledge it. My Godaddy records show that my WhoIs info was checked on this week on the day of the testy exchanges. There`s probably a very small circle of people who read both posts, and were engaged enough with both posts to (a) remember I had posted the link and (B] to want to find out more information about this obnoxious "stranger" (i.e. me) on the forum. I have to say, though, that I`m pretty disappointed this behavior would take place. One of the reasons I come to this forum is to make my questions more reusable. I could just as easily post questions about these books on other forums, where there`s actually more people who are available to answer.
  2. Actually, I misunderstood the database. It`s not even true that each coffee is available only in one size, so Larry wasn`t created limited functionality (i.e. each coffee only in one size) for teaching purposes This discussion was moot.
  3. Yesterday, in one of my posts the issue came up of being a "stranger" in the forum. Larry, quite rightly, said to me that he doesn't know anything about me and referred to me as a "stranger". Really, none of us know anything about each other. However, it doesn't have to remain that way, and I think that people here don't want it to remain that way. Let me explain. It so happens that I just learned about a service that GoDaddy offers. They allow you to check whether anyone has been doing WhoIs searches on your domain names. For example, i can find out how many WhoIs searches (which reveal all my personal information) were done on my domain names ordered by date-- Yesterday, Last Week, Last Month, Today, this week, This Month. As I just found out about this service, I have been using it everyday. It so happens that yesterday there were 2 WhoIs searches done on a domain name that I posted in this forum. Now, the domain name is so weird (www.TitanicRaisins.com) that it's unlikely that random people interested in the domain were checking who owns it. After all, before I bought the domain, there were no Google search results for it. Also, in the last 2 months, there were ZERO whois checks done on the domain. No one cared about it, or who owned it, until yesterday. However, I did post the domain name on Larry's site last week, as I asked for help with the code, and in the last 48 hours, the issue of my identity on this forum was raised and some mildly testy exchanges took place between users on this forum (with me even being called a "stranger"), so I find it funny that I got 2 WhoIs checks on this domain, when for the last 2 months there were 0 checks. It could be a total coincidence but to be honest I seriously doubt it. After all, I was called a "stranger" and the WhoIs reveals a lot of information for the curious. Why the sudden interest in the personal information of the owner of this domain, unless it came from people on this site! Of course, there's nothing at all wrong with doing WhoIs checks on someone. I just find it funny. People want to know information about me and they want to get it by snooping, rather than asking explicitly. Maybe Larry should change the policy for his forum regarding the kind of information we are required to provide....
  4. This is of course Larry's choice, but as a bit of feedback for him, I find it a little odd. For example, Larry spends quite a bit of time explaining very simple PHP concepts and code that he explained in his first two books. However, in those other books, he didn't (to my recollection) create more involved databases where we got exposure to the best practices and strategies behind linking tables, which, in my opinion, requires more explanation than some of the simple php in this book. Therefore, he seems (in my opinion) to assume readers know the more difficult information (which requires actual thought process) while he spends some time explaining simple concepts. That's just feedback he can consider for future editions, if he likes
  5. Thanks for your input Terry. I totally understand that the features of the store might be limited in an example store. I just wanted to clarify if that's actually what's happening here, because I'm trying to learn the SQL as we go. Elsewhere in the forum Larry has said that each coffee was available in 5 sizes. The one size_id for each specific coffee seemed to contradict that.
  6. Thanks Hartley. I am unfortunately still mystified. You say that you generally put the path to the image, but in this code, Larry doesn`t put the path (as far as I can tell). Just a name of the image (unless it is of course the actual image) Can anyone explain, if it is just the name of the image, what is the value of putting only the name into the database, and where, in this application, does it connect to the actual image? INSERT INTO 'non_coffee_categories` (`category`, `description`, `image`) VALUES ('Edibles', 'A wonderful assortment of goodies to eat...', 'goodies.jpg')
  7. I am using PHP 5.26 nd mysql 5.0 This question was originally posted at the bottom of another thread, but as it`s actually a new question, I thought it better to post a new thread (so I erased the question from the other thread) This may be an easy question, but I found my assumption to be rather illogical (as I will explain below) so I thought I would ask. Why, in the specific_coffees table, does each coffee only have one size_id? Does that mean that each coffee is only available in one size? If not, which rationale did Larry use to assign a specific size_id to a specific coffee? The reason why I am having difficulty is the following. I find it weird that each coffee would only come in one size. Why wouldn`t each coffee be available in every size? Is this just a quirk related to Larry`s imaginary coffee store? So please explain, does the fact that each specific_coffee only has one size id mean that it only comes in one size? This question is sort of tangentially related to my other question, what is the rationale for choosing keys. I understand the basic idea of keys to connect tables, but I find (probably due to my limited understanding) the use of the size_id a bit counterintuitive ( because, as stated above, it suggests to me only one size is available for each coffee), unless this store really only does each coffee in one of five sizes.
  8. Thank you Larry for explaining. If I don`t understand something, I have to say it, and to be honest, I don`t think the contradiction between Larry`s answr and Matt`s (as detailed in my last post) was adequately explained.
  9. @Hartley, With respect, I disagree that Matt was correct on the other thread. Using Larry`s answer on that other thread, I show why Matt`s answer was incorrect. Matt was correct about the basic theory (which I wasn`t asking) but when He tried to explain the result, Larry`s answer shows he was 100% incorrect.
  10. Larry, Thank you for answering the post with a clear explanation. By mentioning in your post that you are giving free advice to strangers, it makes you sound a little upset. The only reason I asked is because your books (which I bought) encourage me to ask questions here if I don`t understand, so I`m a little disappointed to get this put back in my face. Yes, i am a stranger, but I am also a customer and your books encourage me to post here. I don`t think it`s a good business practice to refer to your customers that way, especially when you encourage them to come to your forums. But you also seem to imply that you are upset (or less inclined to answer) to provide this advice because Matt already provided the answer and you believe he was correct, or 90% correct. I totally disagree and I think your answer proves the point. Matt provided two posts. In one post, he answered a question that wasn`t asked, and in the second post,when he tried to explain in detail the actual question that was asked, he was 100% wrong -- at least as far as I can see and which your answer shows. For example, you explain the answer here This is exactly the information I was looking for. Matt, in his second (incorrect post) said this which is 100% wrong because Matt is essentially claiming that it is this code ON gc.id = sc.general_coffee_id WHERE general_coffee_id =3 that limits the result to 10. Contrary to what Larry says, I was not asking how JOINS work. I was asking how this joined work in particular. Given that Matt also didn`t understand the proper answer, it might not be as simple as you imagine for people at our level. yes, I know how JOINs work and have read about them, but understanding examples can be more difficult. Furthermore, Larry seems a little surprised I told Matt he was wrong twice. However, if I don`t agree with Matt`s answer, what am I supposed to do? Upon examination of Larry`s answer, I believe i am correct in saying that Matt was wrong! Furthermore, for your next edition, as you claim in your books that you can explain Geek to Normal people, I think it would be useful to into more depth sometimes because it`s clear that people aren`t getting it! Thank you for your assistance. I will provide the version information next time I come.
  11. @Larry I will do more reading up on it as you suggest, but I wonder if you might detail a specific example I have another post on this forum (Post where I ask how ON s.id = sc.size_id limits the results of the query from 30 to 10 with no duplicates. Looking at these tables, I see that the SC table uses a key for size_id. If you have time, and inclination to answer that other post (someone has tried unsuccessfully so far), could you also explain, using this example, how that query`s performance was enhanced using the key size_id? For example, was this key necessary to help avoid the duplication in results that I describe in that post? Thanks if you can help. As I am sure you are aware, it is quite a leap (at least for me ) from reading the theory to understanding the more complex examples. Cheers all.
  12. Unfortunately, I'm almost 100% sure you're not right. With this On staement ON gc.id = sc.general_coffee_id In the SQL (along with the WHERE general_coffee id =3), but this ON statement ON s.id = sc.size_id ommitted from the SQL query, there are 30 results with duplicates of the SKUs, therefore this SQL ON gc.id = sc.general_coffee_id WHERE general_coffee_id =3 does not limit the query to 10 results. It gets all ten types of specific coffees (which is obvious because there are only 10 types) but it also allows for duplicate records of the returns, which is 30. This code ON s.id = sc.size_id removes the duplication, and I would like to know why if someone knows. Also, as mentioned in the OP, the 30 rows with duplicates must represent the total value of something but what. Maybe Larry or someone else can answer when he has time.
  13. Thanks for trying, but you didn't answer the question that I was trying to ask. it's my fault for not being clear enough I understand the general purpose of ON. However, I didn't understand how this PARTICULAR ON worked in this instance. Namely, why does useing the limit of ON s.id = sc.size_id produce a result with 10skus and none of them repeated. In order to answer this question, you would probably have to look at those tables (see images below), and not just the theory behind ON. In other words, I looked at those tables, and I never would have thought that creating a query of ON s.id = sc.size_id would produce a list of the 10 Skus with no repeats. How did Larry know that creating that ON would limit the results to the 10 unique skus with no repeats. Here are the two tables for your reference. Why does joining them where s.id = sc.size_id create a result of 10 (no repeats), whereas a list of 30 is created without this join. How does the join eliminate the repeats.
  14. UPDATE: note, to save you some time reading, you may want to read my next post (the third post on this thread) instead. After Matt responded to the OP, I realized that the OP might not be clear enough, because Matt answers a question that I wasn't trying to ask. In the third post below, I hopefully make the question clearer. In an effort to better understand this SQL quoted below (which is from page 196), I ran this SQL twice, except the second time I ran it, I removed from line 4 this code ON s.id = sc.size_id the first time I ran it, there were 10 results, with 10 different SKU ids. In other words, no duplicate results. The second time I ran it (removing ON s.id = sc.size_id), there were 30 rows returned, and therefore many duplicate results. the problem is, I don`t understand a) how s.id = sc.size_id limits the results to 10 without allowing duplicates. 2) why, upon removing that code, did it return 30 results, as opposed to 27 or 94. 30 must represent the total number of something but what? SELECT gc.description, gc.image, CONCAT( "C", sc.id ) AS sku, CONCAT_WS( "-", s.size, sc.caf_decaf, sc.ground_whole, sc.price ) AS name, sc.stock FROM specific_coffees AS sc INNER JOIN sizes AS s ON s.id = sc.size_id INNER JOIN general_coffees AS gc ON gc.id = sc.general_coffee_id WHERE general_coffee_id =3 AND stock >0 ORDER BY name ASC LIMIT 0 , 30
  • Create New...