Jump to content
Larry Ullman's Book Forums

JamesButler

Members
  • Posts

    12
  • Joined

  • Last visited

JamesButler's Achievements

Newbie

Newbie (1/14)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

0

Reputation

  1. Yes, I think you are correct. I was looking at that last night and noticed that a lot of those records had the same reg date because I pasted in your SQL in phpMyAdmin and ran it that way. I was monkeying around with XAMPP this morning and needed to add the Mercury mail server. In XAMPP, if you don't install everything the first time, you have to uninstall and reinstall choosing everything. The installation program will not let you choose an install directory that is not empty, so, I had to uninstall everything. In the process I forgot to backup the databases I created so far in the book! Yikes! So, I am starting over from scratch. I may just enter those user records in manually one-at-a-time so they have different reg dates. Oh well, my mind is slipping. I'm getting old and should have know better, but hey, it's only development now.
  2. I'm in Chapter 5 Introduction to SQL and working through some of the SQL queries to get a feel for doing this. I ran into some unexpected results while using the LIMIT x,y statement. First I ran the query: SELECT first_name, last_name FROM users ORDER BY registration_date ASC; And I go back this result set: MariaDB [sitename]> SELECT first_name, last_name -> FROM users -> ORDER BY registration_date ASC; +------------+-----------+ | first_name | last_name | +------------+-----------+ | Larry | Ullman | | Zoe | Isabella | | Ringo | Starr | | George | Harrison | | Paul | McCartney | | John | Lennon | | Michael | Chabon | | Richard | Brautigan | | Russell | Banks | | Homer | Simpson | | Marge | Simpson | | Bart | Simpson | | Lisa | Simpson | | Maggie | Simpson | | Graham | Greene | | Don | DeLillo | | Jonathan | Franzen | | David | Jones | | Peter | Tork | | Micky | Dolenz | | Mike | Nesmith | | David | Sedaris | | Nick | Hornby | | Melissa | Bank | | Toni | Morrison | | Abe | Simpson | +------------+-----------+ 26 rows in set (0.00 sec) Then I ran the query: SELECT first_name, last_name FROM users ORDER BY registration_date ASC LIMIT 1,1; And this is the result set: MariaDB [sitename]> SELECT first_name, last_name -> FROM users -> ORDER BY registration_date ASC -> LIMIT 1,1; +------------+-----------+ | first_name | last_name | +------------+-----------+ | Zoe | Isabella | +------------+-----------+ 1 row in set (0.00 sec) As expected, I get back the second row and just return that one row since Zoe Isabella is the row at index 1. So, I tried to return just Ringo Starr. He is at index 2, so, I need LIMIT 2,1. Ok SELECT first_name, last_name FROM users ORDER BY registration_date ASC LIMIT 2,1; But I don't get Ringo, I get this: MariaDB [sitename]> SELECT first_name, last_name -> FROM users -> ORDER BY registration_date ASC -> LIMIT 2,1; +------------+-----------+ | first_name | last_name | +------------+-----------+ | Paul | McCartney | +------------+-----------+ 1 row in set (0.00 sec) What is going on? Paul is suppose to be at index 4! Any Ideas?
  3. In my personal project that I am re-learning javascript for I will be using jQuery so I will not have to worry too much about browser issues! Its nice to know how to code plain javascript to use it like one of the libraries out today, so you can understand how they coded the library. But I don't think I will be doing that much myself. I will just use jQuery or Modernizer for my web projects. My view may change by the time I finish Larry's book but not yet.
  4. #HartleySan, I am for forcing everyone to get an updated computer so everyone will have an HTML5 compatible browser! Hey, if Facebook can force Timeline on everyone...... haha. Just finished chapter 7. I noticed that a few examples looked a lot like jQuery. :-)
  5. Hey Larry, can you recommend a good Network Monitor program?
  6. Chapter 2 was interesting. I learned about the new HTML 5 doctype and some new elements and attributes. Validating a login form, nothing new for me except for the new HTML5 elements validate themselves, very interesting, and if you don't have "novalidate" attribute in the form element, your javascript validation code will not execute! By the way, that attribute was not in the form of the downloaded code for chapter 2. Just a heads up for others. I would not suggest using code you find online, for the security reasons, just base your code around the same concept. I use code created by others just to get an idea on where to begin when trying to solve a problem in a web application.
  7. Thanks again Larry for this very fine book on Javascript. I have been extremely busy with work lately and haven't had a change to get back in the book until now. I have to say that among the new features in HTML5, one of my favorites, and most welcome, is the autofocus attribute for form elements. I can't tell you how many sites do not implement javascirpt to set this and now with this new attribute, I hope more use it in their forms now that they won't have to use code to implement this useful feature. Really bugs the crap out of me to load a form and have to click in the first input box to get started. And a lot don't even make sure that the tab order works correctly either! Whew! Got that off my chest!!
  8. BTW Larry, your PHP 5 Advanced book really help me a lot with some hard implementations I was doing in PHP. Thanks!
  9. I had a 5 chapter preview on Safari Books Online, but now it is the full version!! Sweet!
  10. I suspected as much after I thought about it for awhile. I guess you have to collect stats from a lot of different places to get a better picture of the overall browser coverage. I used IE for a long time when I first started with computers, then moved on to Netscape then they turned into Firefox. Started using FireFox for dev and Chrome for general surfing. I have IE, FF, CH, Safari, and Opera on by system for testing web apps but I use Chrome more than any of them. At work I have to use IE because the Serena web app I work with only works in IE. Great to see my Safaribooksonline copy is the full version now and no longer a rough cut!!
  11. Hi Larry, I'm reading a rough cut version of your new JavaScript book on Safari. So far It has been informative and interesting. This version only has the first 5 chapters so I'm anticipating getting the rest of the title soon on Safari. I'll will do a review on it at Amazon when I'm finished. Oh, yeah, I did have a question. In chapter 3 under The Browser: Your Friend, Your Enemy, you listed some statistics for browser usage and I was wondering where you got the stats for August 2011? • Internet Explorer, 38.9% • Firefox, 25.5% • Chrome, 20.2% • Safari, 7.7% • Opera, 2.9% • Mobile browsers, 7.1% For when I checked browser usage stats at the W3C page I get these stats for August 2011: IE 22.4 % FF 40.6 % GC 30.3 % Safari 3.8 % Opera 2.3 % Are your statistics from your site or some other site. I know these I have listed are for people accessing the W3C site. Is there a place that shows more realistic stats for browser usage in general? Regards....
×
×
  • Create New...