Jump to content
Larry Ullman's Book Forums

Edward

Members
  • Content Count

    1115
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by Edward

  1. I have seen that the Yii framework is supposed to run 5 times faster than the Zend framework. I will take a look into it. But what if we are coding in procedural code, the framework is in OOP, can we still use procedural with that? Ah larry my mistake again, i will look at that again today Zend Framework, i thought the Zend Server included that. Will check Zend and Yii out.
  2. I tried this also i added to mysql.inc.php <?php // This file contains the database access information. // This file establishes a connection to MySQL and selects the database. // This file defines a function for making data safe to use in queries. // This file defines a function for hashing passwords. // This script is begun in Chapter 3. // Set the database access information as constants: DEFINE ('DB_USER', 'root'); DEFINE ('DB_PASSWORD', 'edward'); DEFINE ('DB_HOST', 'localhost'); DEFINE ('DB_NAME', 'knowledge_is_power'); // Make the connection: $dbc = mysqli_co
  3. Update, i tried running this code in my mysql.inc.php file // Make the connection: $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); // Set the character set: mysqli_set_charset($dbc, 'utf8'); $q = "INSERT INTO users (username, email, pass, first_name, last_name, date_expires) VALUES ('Admin', 'admin', 'password', 'Admin', 'Admin', SUBDATE(NOW(), INTERVAL 1 DAY) )"; $r = mysqli_query ($dbc, $q); Now when i run the index.php file it run the require(MYSQL); and this part of the code would then run. Well the record was successfully written to the users table. Do
  4. I don't want to give up that easy, with your explaining i am sure i will make it through. I tried to add in the echo mysql_error (); But no reading comes up, i also have this error showing on the same page: An error occurred in script 'C:\xampp\htdocs\knowledge_is_power\www\index.php' on line 35: mysqli_query() expects parameter 1 to be mysqli, null given
  5. Hey everyone i wanted to start a topic on php frameworks and which ones you like the most? I like to code stuff from scratch, but i have been recommended by friends for bigger projects to build into a framework. I have just download Zend Server 5.6 and taking a look. So far it seems easy to use and it is great at error handling and monitoring your website page performance. I feel confident with Zend as it is by the makers of PHP and looks like it will be here to stay, but the downside it seems that you need a deep pocked with it, and even the impression i got when i just downloaded it and i ha
  6. I cleared the cache and now it is showing, wonderful, thanks
  7. Ive checked this again i can't see what the problem is? I have used mysql connections before when connecting to the database, this was the first time for me using mysql extension with objects. What test could i do for checking the mysqli connection. I have the code copied in my apache server exactly as from your book, i have just been making important notes as i read through.
  8. I included the MySql connection script, here is my index.php page up till the part when $dbc is required, <?php // This file is the home page. // This script is begun in Chapter 3. // Require the configuration before any PHP code as the configuration controls error reporting: require ('./includes/config.inc.php'); // The config file also starts the session. // To test the sidebars: // $_SESSION['user_id'] = 1; // $_SESSION['user_admin'] = true; // Require the database connection: require (MYSQL); // Next block added in Chapter 4: // If it's a POST request, han
  9. Edward

    Introductions

    Yes the books are great, i will be purchasing a few of his others also. Interested in his new javascript book. Is that what dogtanian looks like after all these years?
  10. I just updated my profile picture, but the old one is still showing?
  11. I am getting this error coming up when i try to run my script, it is showing on all scripts that require the database dbc connection. Here is the error that is showing on the knowledge_is_power index page, does Larry or anyone here know how to fix this? An error occurred in script 'C:\xampp\htdocs\knowledge_is_power\www\index.php' on line 35: Undefined variable: dbc Array ( [0] => Array ( [file] => C:\xampp\htdocs\knowledge_is_power\www\index.php [line] => 35 [function] => my_error_handler
  12. Edward

    Introductions

    Hey pete you have some nice website's glad you love the larry book's. I am working through Effortless Eccomerce right now, its awesome. See you around!
  13. Thank you for correcting me on the data types. Well you have some good points there, i guess there is a chance may be even i do not exist in 26 years time, lol. Well so be it, TIMESTAMP() it will be. Thanks Larry
  14. TIMESTAMP() *A timestamp. TIMESTAMP values are stored as the number of seconds since the Unix epoch ('1970-01-01 00:00:00' UTC). Format: YYYY-MM-DD HH:MM:SS Note: The supported range is from '1970-01-01 00:00:01' UTC to '2038-01-09 03:14:07' UTC "I was wondering about the TIMESTAMP() data type, well this runs out in 2038, what if we are building a site that we are planning to have longer than 2038? Should we use the TIMESTAMP() now and hope PHP will do something about this or DATETIME() which runs up to 9999?" DATETIME() *A date and time combination. Format: YYYY-MM-DD HH:MM:SS
  15. Hi, Everyone here ! How are you all? I would like to leave a review about the Effortless E-Commerce book. I have bought a few PHP Eccommerce books some which were written with OOP coding using the business tier model and mvc. But i have found Larry Ullman's to best the other books by far on the market. It comes with well explained clear examples of some of the most up to date PHP features which are no readily available. The book is also great for beginners to understand the Model View Controller design pattern framework as Larry starts it of in procedural code, which helps some of us less
×
×
  • Create New...