Jump to content
Larry Ullman's Book Forums

Larry

Administrators
  • Content Count

    5158
  • Joined

  • Last visited

  • Days Won

    143

Everything posted by Larry

  1. Interesting question. Two options in my mind. One, just create four season columns in the database with the price for each season set. Then you'd use PHP to compare the chosen dates against the season dates (i.e., the definition of a season would be written into PHP). And the PHP code could decide how to handle a straddler. Or you could create a table that stores date ranges and prices (so X records for X seasons per year). You'd then need to use some logic in PHP to get the dates for multiple seasons and apply the right rates.
  2. Then perhaps there's an error in your .htaccess file that prevents it from being parsed. Or perhaps the rules are working but they're not doing what you expect them to.
  3. Apache would ignore .htaccess files if httpd.conf (the primary configuration file) isn't set to allow overrides (i.e., changes) within directories.
  4. Hey Floydian. Always good to hear from you. Huge congrats on the weight loss. 145lbs? That's insane. I'm jealous of your ability to get to the gym. I've got so little time. Thanks for the post and drop by any time! And keep up the good work (outs)!
  5. I can look at your code. However, as I've said twice now in this post, I don't think the problem is in the code but rather in your directory structure and URLs. Neither of which have you provided yet. If your directory structure is the same as that in the book, that's great, but your directory structure is not the same as in the book. In the book the files are in the Web root directory (htdocs), but you've placed everything within a subdirectory. This is fine, too, but you have to change all references accordingly. For example, the link to ./physical_product/shop/coffee is incorrect. The initial period means the link is relative to the current page, which won't often be the case. What you want instead is /physical_product/shop/coffee (as I wrote before), where the initial / means to start in the Web root directory.
  6. Thanks for the nice words. As I wrote in my previous post to the original poster, I suspect the problem has to do with your directory structure (i.e., how the files are organized on your computer and what URLs you're using).
  7. What format will $bid['createtime'] be in? Is that the same as the format that works when hardcoded into the script?
  8. I did a Google search on "adobe air settimeout" and the first hit seems to address your situation: http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7f0e.html#WS5b3ccc516d4fbf351e63e3d118666ade46-7efb
  9. Thanks! It sounds like you're confusing the topics of character sets and collations. I would generally use UTF8 as my character set for all tables and columns. I would also set the proper collation for all tables and columns. You can then adjust the collation (but less likely the character) set on a column by column basis. Kudos and thanks for adding your own solution. Yeah, that's a minor point. For performance reasons, the recommendation is not to use fixed text columns with UTF8. But for performance reasons, something like an encrypted password, that will always be a set length, should be a CHAR. And, of course, MySQL will change the column's definition to what it thinks it should be. So the answer is...maybe, maybe not!
  10. First, thanks for posting all the key information. Much appreciated. The cause of the problem is the directory structure. You say that the images and products folders are in the root directory, but are they really? Or are they in the physical_products directory (per your URL)? If it's the latter, then you need to change references in the header from /something to /physical_products/something. You'll also need to set a RewriteBase in the .htaccess file, just after turning the RewriteEngine on: RewriteBase /physical_products/
  11. ANSWER1: NULL means "no known value". It's a very special kind of thing. It's possible you'll see it on a SELECT with no product_id in a LEFT JOIN. ANSWER2: A Web reference on what?
  12. I'm not exactly sure I understand the relationship among the tables, but... Yes, you can write an INSERT query for the values table as long as you know the product_id, value, and datetime. You don't need to do a SELECT query to grab those values unless you don't have them. Not sure how this is a JOIN issue, though.
  13. Hey Jonathon, Thanks for the words on the forum. As for Net_Geo, I'm a little confused. There's Net_Geo, which I used in the book, whose current version is 1.0.5. And there's Net_GeoIP, whose current version is 1.0.0RC3 (beta). Based upon the directory structure you originally indicated (Net/GeoIP.php), it looks like you installed Net_GeoIP, although I'm not sure where you get version 1.3 and that 2006 date from. Based upon the directory structure you indicate in this follow up post (Net/Geo.php), that's Net_Geo. So the first thing you'll need to do is pick one and go with it. If you want to match the book's instructions, use Net_Geo. If you want to use Net_GeoIP, see the PEAR documentation for that class.
  14. Kudos for figuring it out and thanks for letting us know. In the future, please make sure you also include vital details such as the version of PHP in use, per the forum guidelines.
  15. You should have been automatically redirected to the correct URL. But if you follow the Books By Topic > E-Commerce link at the top of the page, you'll be taken here: http://www.larryullman.com/books/effortless-e-commerce-with-php-and-mysql/#downloads
  16. What version of PHP are you using? What version of PEAR Geo IP Location? How did you install the PEAR Geo IP Location package?
  17. Hello Steve, Thanks for your question. I looked at the article and I'll admit that there are a few points made in the article that I disagree with (e.g., the argument to use mysql_pconnect() or the failure to confirm that variables are set before referencing them). I also don't think the author convinced me of the merits of addcslashes() over mysql_real_escape_string(). The argument for mysql_real_escape_string() is twofold: first, it puts more functionality into the database, which is generally advised. Second, it performs the escaping in a way that's particular to the character set used by the database, so it's more particular and less generic than addcslashes(). Also, to be clear, the author isn't using addcslashes() AND mysql_real_escape_string() but rather addcslashes() INSTEAD OF mysql_real_escape_string(). To be clear, it's really a minor distinction between the two, but I prefer mysql_real_escape_string().
  18. Thanks, Gregory, for the interest. I just suggested to the publisher that we do a new edition of this book, but I haven't heard back from them yet. Should they say yes, the next edition still wouldn't come out until 2012. Even though this edition came out in 2007, I think it's still reasonably up to date.
  19. To edit a page, presumably you're passing the page ID in the URL, as you would with a delete page feature. Then, use that ID to retrieve the page's data from the database. Then echo out the page's content between the textarea tags used for the RTE.
  20. This forum is specific to the fourth edition of the book "PHP for the Web: Visual QuickStart Guide", written by Larry Ullman and published by Peachpit Press published in March 2011 (ISBN 0-321-73345-2). If your question pertains to something specifically written in the book, including a particular script or bit of code, please make sure you're posting in the forum for the correct edition. If your question is not related to any book, that's fine, too.
  21. This forum is specific to the third edition of the book "PHP for the Web: Visual QuickStart Guide", written by Larry Ullman and published by Peachpit Press published in December 2008 (ISBN 0-321-44249-0). If your question pertains to something specifically written in the book, including a particular script or bit of code, please make sure you're posting in the forum for the correct edition. If your question is not related to any book, that's fine, but I would recommend you post your question in the forum for the most current edition of this book, which will be the most active.
  22. This forum is specific to the second edition of the book "PHP for the World Wide Web: Visual QuickStart Guide", written by Larry Ullman and published by Peachpit Press published in February 2004 (ISBN 0-321-24565-2). If your question pertains to something specifically written in the book, including a particular script or bit of code, please make sure you're posting in the forum for the correct edition. If your question is not related to any book, that's fine, but I would recommend you post your question in the forum for the most current edition of this book, which will be the most active.
  23. This forum is specific to the first edition of the book "PHP for the World Wide Web: Visual QuickStart Guide", written by Larry Ullman and published by Peachpit Press published in April 2001 (ISBN 0-201-72787-0). If your question pertains to something specifically written in the book, including a particular script or bit of code, please make sure you're posting in the forum for the correct edition. If your question is not related to any book, that's fine, but I would recommend you post your question in the forum for the most current edition of this book, which will be the most active.
  24. This forum is specific to the second edition of the book "PHP Advanced: Visual QuickPro Guide", written by Larry Ullman and published by Peachpit Press published in March 2007 (ISBN 0-321-37601-3). If your question pertains to something specifically written in the book, including a particular script or bit of code, please make sure you're posting in the forum for the correct edition. If your question is not related to any book, that's fine, too.
×
×
  • Create New...