Jump to content
Larry Ullman's Book Forums

Edward

Members
  • Posts

    1115
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by Edward

  1. My old thread may help on the dbc undefined error http://www.larryullman.com/forums/index.php?/topic/940-undefined-variable-dbc/
  2. Hey Larry, i wanted to ask you, since you are a fan of Yii, could you add in a Yii framework forum into the forum maybe somewhere at the bottom so we could put our questions and stuff in there. Yii is absolutely awesome, it has helped me to understand the use of objected orientated code and also helped me almost immediately see how the MVC (Model View Controller) System works. This framework is just so great, it saves time tremedously.
  3. This is a subject that I am also interested to hear. I have also seen this mentioned in an oreilly book, the author said if you are worried about two users accessing the same row of a table then you should lock the tables. He also mentioned that this method would slow down the website performance substantially. I have three books on Ecommerce development and none of them lock tables, but as I said on one of my previous posts Larry Ullman has the best book on the market. You will find with orielly books that one author tends to rub off another, whereas Larry has his own uniqueness in ease of expression, his books are just laid out more logically and easy to follow. The other thing I want to comment on is that u can't expect one book to cover everything you need especially in the world of eccomerce today, these books are merely starting points. Okay I think I have rambled on enough for one day. Let's wait for the answer.
  4. Also if your index.php file is in the htdocs directory then set BASE_URI to http://localhost/
  5. Assuming that your index.php file is in the htdocs folder, then try this define ('BASE_URL', '/') I have my site setup like this define ('BASE_URI', 'http://localhost/knowledge_is_power/'); define ('BASE_URL', '/www/'); define ('PDFS_DIR', BASE_URI . '/pdfs/'); // Added in Chapter 5. define ('MYSQL', '/includes/mysql.inc.php'); I am also using the xampp localhost for running the knowledge is power website, the location of my index.php file is here http://localhost/knowledge_is_power/www/index.php And on the c drive it is located at C:\xampp\htdocs\knowledge_is_power\www\index.php This should be enough info for you to figure it out if the above what i have written doesn't happen to work.
  6. If i can get this yii framework installed successfully, i will work through your tutorial first before i start on anything else. I will let you know how it goes. I will be finishing of your Effortless E-Commerce but i would like to learn the Yii at the same time with some OOP stuff to keep things interesting.
  7. Okay I'm going to go with the Yii framework I've just ordered the two books on the front of the yii framework website. Larry you may notice a slight increase in your income this month I've also ordered four of your books. I also got two of the object orientated books you were recommending. Well I am very excited about learning yii and the oop stuff, there is no turning back now. Thanks to you guys for helping me to come to a decision.
  8. I was thinking about pictures again today, I know why they would be cool. For example I will be making some alterations to the Knowledge is power website and I would like to put up my screen shot. Just imagine if others did this also, people who did not have the book would get inspiration from what readers of the Ullman book had created them self and get confidence to buy.
  9. Back last year when I first learned basic php, mysql and JavaScript there was an exercise in the book where we had to extract XML data from the yahoo news website page I think it was an rss feed. I had a look at your weather site but you can only get a trial period, but what I am wondering is where do you need to have the weather forecast for exactly?
  10. Thanks I will put my order in at amazon for these. I would like to get the first PHP book also, as I have some other authors book but I like the way you break into topics and explain them. It will be a reference guide for me. I have a book on php with OOP, I did read the quick start guide but then after in the book was mainly about the php 5 OOP library and functions. There is lack of example on how to adapt in the real life situation.
  11. Well may be you are not out of your depth, if something was made by the GOD then maybe you would be, but since it is made by a human the problem must have a solution. Are you trying to get weather data for a particular place or to be able to select it for any country? The weather website http://worldweatheronline.com/ looks quite cool!
  12. I guess that is best, did you see my picture's from flickr in my review of your book post?
  13. Hi, Larry i am sorry about all these questions but i need to ask you? I am working through Effortless E-ccomerce book now as you know to work out how the MVC model works. But i would really like to get into the Object Orientated Programming so i can work with frameworks etc, i would like to know is your PHP Advanced book ideal for learning this stuff? I got inspiration from your loyal member Jonathon noticing he was working with the Yii framework and using OOP code. Or is there another way we should go about learning this OOP stuff, what do you suggest? I am planning to put my order in at Amazon.com this week to get PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition) PHP for the Web: Visual QuickStart Guide (4th Edition) PHP 5 Advanced: Visual QuickPro Guide MySQL, Second Edition
  14. Hey larry, i wanted to ask you this question as it was something that was bugging me. Why do you put the rabbit logo on your books? Do you have a rabbit?
  15. Well which is the php script that will receive the GET data forecast.php? The values passed after the .php will be part of the GET so you can extract through values individually from the $_GET array if you know what they are. The extraction takes place on your forecast.php, the script where the variables were passed to. You could process that xmlhttprequest and if the values are sent to forecast.php, see what values come in the URL if you are unsure of what they are.
  16. I am not struggling with this Jonathon, i simply placed the mysql.inc.php below the root directory. When i run the index.php, it was running the mysql.inc.php code but was not storing the variable $dbc in memory so that it was unavialable globally. I am using Windows 7, Larry is using a Mac, well i got confused with Larry's book Page.54 Figure 3.2, it shows the apple operating system there. It seems to show in the book the mysql.inc.php below the root directory there?? Everything with regards to the PHP server scripting language i am happy with. I have two other books here on E-commerce development both are in OOP, but the first one uses the three tier architecture which is not the same as MVC and the second is a OOP MVC framework. I have to admit the second book was too much for me, as at the moment i am not completely familar with what MVC is, so thats why Larry's book is perfect for me, it is helping me to see the structure while we are coding basically with procedural. The reason for me doing these books is because i don't want to be writing how i feel spaghetti type code which will be impossible to fix later on, i want to fully understand the MVC approach and use this method.
  17. Well i hope Larry's next book will be "E-Commerce with PHP and MySQL the Object Orientated way". The market is lacking a good book like that at the moment, there are framework books in OOP for E-commerce and Social networks but not an all in one. I will have a look at the YII and see how it fits together! Thanks again.
  18. Hey Larry, i tried to insert images into the forum but i keep getting this message "You are not allowed to use that image extension on this community." This was via the image url method, so an image could be loaded from a url. Would you be able to make it so we can load our picture's in directly.
  19. Here are picture's of my Larry Ullman book, folder and my notes. http://www.flickr.co.../in/photostream http://www.flickr.co.../in/photostream http://www.flickr.co.../in/photostream
  20. An error occurred in script 'C:\xampp\htdocs\knowledge_is_power\www\index.php' on line 38: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given "Well this is not working because i have no data in my pages table yet, okay all done proceeding on..." Extract from index.php to show line 38 in red: <?php // Bonus material! Referenced in Chapter 5. // Display the most popular pages: echo '<h3>Most Popular Pages</h3><p>'; $q = "SELECT COUNT(history.id) AS num, pages.id, pages.title FROM pages, history WHERE pages.id=history.page_id AND history.type='page' GROUP BY (history.page_id) ORDER BY num DESC LIMIT 10"; $r = mysqli_query($dbc, $q); $n = 1; // Counter while ($row = mysqli_fetch_array($r, MYSQLI_NUM)) { // Display each record: echo "<h4>$n. <a href=\"page.php?id=$row[1]\">$row[2]</a></h4>\n"; // Increment the counter: $n++; } // End of WHILE loop. echo '</p>'; ?>
  21. Finally i figured it out. It was my mistake i had misunderstood what you had written Larry, I put the mysql.inc.php file below the root directory and not in the /includes/ directory above the root folder. The index.php file was running the mysql.inc.php script but was not saving the variable $dbc for global use. That is something now i don't even understand why it doesn't work. But now its all fine while in the includes. Haha i have a new error now, more detective work for me today, eh! An error occurred in script 'C:\xampp\htdocs\knowledge_is_power\www\index.php' on line 38: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given
  22. For people wondering what the disabling part in the "php.ini" file looks like for Magic Quotes here is a copied ; Magic quotes are a preprocessing feature of PHP where PHP will attempt to ; escape any character sequences in GET, POST, COOKIE and ENV data which might ; otherwise corrupt data being placed in resources such as databases before ; making that data available to you. Because of character encoding issues and ; non-standard SQL implementations across many databases, it's not currently ; possible for this feature to be 100% accurate. PHP's default behavior is to ; enable the feature. We strongly recommend you use the escaping mechanisms ; designed specifically for the database your using instead of relying on this ; feature. Also note, this feature has been deprecated as of PHP 5.3.0 and is ; scheduled for removal in PHP 6. ; Default Value: On ; Development Value: Off ; Production Value: Off ; http://php.net/magic-quotes-gpc magic_quotes_gpc = Off ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. ; http://php.net/magic-quotes-runtime magic_quotes_runtime = Off ; Use Sybase-style magic quotes (escape ' with '' instead of \'). ; http://php.net/magic-quotes-sybase magic_quotes_sybase = Off
×
×
  • Create New...