Jump to content
Larry Ullman's Book Forums

Jonathon

Members
  • Posts

    1064
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by Jonathon

  1. Think I figured out my problem. I should have used: SELECT content.headline, content.content, links.link, links.anchor FROM content INNER JOIN links USING (content_id) But still open to hearing people's ideas on this topic, if they have any
  2. I see, well I would guess that that's good for terms of longevity and numbers of sales. Of course I imagine the profits for you personally are some what reduced when you go through Amazon, but as i mentioned earlier the chances of additional sales of the back of the JS book would be significantly increase (I would imagine). Good luck
  3. This week, I thought i'd take the time to work more appropriately with Databases and JOINS. So to do this I'm mocking up a website and I'm going to store all the content for it (most of the content) in a db. I've tried to keep it within the normalization standards and am now playing with some JOINS. What i'm finding though is that the first join i'm doing is providing a duplicate set of results. Can somebody outline what I am doing wrong here please. This is my query: SELECT content.headline, content.content, links.link, links.anchor FROM content INNER JOIN links ON content.page_id = links.page_id And my tables: `content` (this is for the various pieces of content i'll have content_id int(11) NO PRI NULL auto_increment content text NO NULL // actual content headline varchar(255) NO NULL // headline of title page_id int(11) NO NULL // what page the content belongs to date_added datetime NO NULL // probably not needed but it's for my reference `link` content_id int(11) NO NULL // Foreign key and content that link belongs to link varchar(255) NO NULL // actual href value anchor varchar(255) NO NULL // anchor text for that link link_id int(11) NO PRI NULL auto_increment // Link primary key page_id int(11) NO NULL // page that link belongs on `meta_descr` meta_descr_id int(11) NO PRI NULL auto_increment // primary key keywords varchar(255) NO NULL // keywords content description varchar(255) NO NULL // description content content_id int(11) NO NULL // foreign key and content that meta info belongs too date_added datetime NO NULL // for my beenfit `pages` Field Type Null Key Default Extra page_id int(11) NO PRI NULL auto_increment // Not sure i need this table?? But one of the guidleines on NF made me think I did. meta_descr_id int(11) NO NULL Love to hear your thoughts on my issue (Is it possible to just use DISTINCT to remove duplication? However I feel that if possible this would be a hack rather than proper practice). And also whether you disagree/agree with my attempt at normalization. Thanks
  4. Assign the checkbox an id and use this id when the form is posted to retrieve the item. Would be one way.
  5. Define the meta tags information in a variable? Depending on the meta tag and the page it's going on you will probably need some way calling the correct meta information. I store mine in a table using a series of Primary and foreign keys to retrieve them.
  6. Thanks for this gameface. I acutally got a new system yesterday and installed xampp again. I don't know about the Apache php.ini file but I had 2 php.ini files insise the php folder. One development and one production. Anyway, thanks, I'm sure this will be useful to many people
  7. With regard to your Newsletter that stated I thought I'd offer my thoughts. Basically I have no preference as to whether a book is self published or traditionally published. For me what included far outweighs how it`s presented. However I personally am a stickler for books. I just enjoy looking at pages and scribbling notes rather than clicking mouses or sliding your finger across a screen. But this doesn't mean I wouldn't buy your book if it was solely available in an electronic format. I know that other people prefer electronic formats I think it was Paul Swanson who said he`d preferred them electronically. Finally, In terms of what criteria I use to buy a book I use Amazon reviews. I tried to read all the reviews, even the negative ones to see what negative aspects there are as a lot of them don't actually relate to the material (Things like, it took too long to get here - 3 stars). I also read the contents lists, look at the description from the author and the number of pages. I think i'm quite in depth because I want to get the choice right. I would imagine, that a lot of people are similarly as thorough though. Obviously with this JavaScript book, I would buy it off the back of my knowledge of your other books. In that I know it will be well written, easy to grasp and useful. I think many others here would follow a similar line of thought.....but, in terms of attracting a newer reader and more sales outside of repeat business I think self publishing could be difficult to generate the sales? Maybe you could sell it through your site for 6-8 weeks at $x because there is a lot of interest and then have a publisher try to push it around the net and Amazon in particular. I don't know if this is even possible or worthwhile. I say this because I would guess that you would make more money if you sold it directly to us (the people using your site and know about the book) and then stop selling it on your site and have it sold through Amazon or wherever and take a hit in terms of actual income (As i imagine publishers/distributors take a hefty chunk) but offset that against the larger exposure that Amazon gains and the potential for follow-on sales of other titles you've written. Jonathon :-)
  8. Hello Jibaba Please post the code you are using and also the full error message.
  9. I would agree on the text formatting. But as for downloading a CMS like WP for example I think you'd find it hard to easily work out what's happening as there is a lot of code and it's OO.
  10. Apologies HartleySan, though I'm sure you Japanese is also very good No Matt, not at all I liked your analogy, I've always found the area of which table should be first a little hazy. But I think i'm going to try your approach to it! Thanks
  11. Hello Cooper, Please can you post your code so people will be able to help look at any problems there may be in it. Currently it would be total guess work
  12. I liked your answers Antonio, they were really clear, I too need to brush up on my complex joins and found them helpful. Also I'm a big admirer of you, HartleySan, Matt and any others who are communicating in their second/third languages
  13. I would firstly ask are you sure you want to delete all the info. Would you prefer to make the user inactive, therefore keeping their details incase they come back? I'm not saying your wrong at all, just confirming your sure you want to delete all the user and comment details
  14. Congratulations to you too HartleySan on your 200th post :-)
  15. I believe its just a WHERE column = NuLl. Not 100% on whether or not it needs single quotes
  16. Thanks HartleySan, I knew it was coming soon. But I've only been able to access the forum recently on my phone as I'm relocating. I believe your #200 post is up soon too And yes, you are correct he uses a something like md5 encrypted random unique id in the column and then uses it in his activation script to set that column to Null essentially confirming that the user does exist.
  17. Well for that column, I think I'd allow for a boolean and use the result from the mysql to write the appropriate link. That is assuming they don't need the boolean column to actually provide anything more that a yes or no. If you did need to, you could always set it as a default to NULL (as null and empty aren't the same) and then update the column on creation of the gallery. I think that's how I'd look at doing this
  18. Hi Bahaa, You'd really have to show us code to be able to help you. I understand your problem, but it would be complete guess for anyone to tell you what's wrong. Please post the code your using and what it's out putting. Thanks
  19. Obviously Larry is the best man for this question but I have the ecommerce, php6 and mysql 5 and php advanced. And I don't think they cover the topics mentioned. But he does talk about full text searching in php 6 and mysql 5 which he is just re writing. And he has also written a piece on ajaxfying a product rating system (I think). If you search the website (not the foum) you should be able to find it. Also he does talk about how to use zend lucene in a search engine. Again searching the site should bring up the article.
  20. Performance wise I would suggest that letting MySQL do all the work would be better. Rather than letting MySQL retrieve the text and then making php act on it.
  21. No would be my answer, many people just buy/download scripts that do this for you. I think it comes down to circumstance and how much control and understanding of your own site you want.I personally think that it's always best to understand your sites code if you are a developer. Just my opinion, others may disagree. What I would say is that the book is very friendly and if your stuck or don't understand something then just use the forum. There are loads of really helpfull and knowledgeable people who use the forum and someone is always willing to help. On a side note I hear drupal is not for the feint hearted. What are you stuck on currently in the book? Jonathon
  22. I haven't read the links, as I too and watching the champions league final. But you can use MYSQL to pull the first x number of characters from the text. It's something like LEFT(body, 200). That might not be totally correct, but it's along those lines. Where LEFT is start of the text and body is the column and 200 is the number of characters. Hope that helps, apologies if it's been answered, I haven't had the time to read all the threads and links
  23. I totally understand Antonio, I'm the same. That's why I have really taken to Larry's books. From experience the Apress books are brilliant references on topics but they're hard work. I'm looking forward to reading both books and will let you know how I get on
×
×
  • Create New...