Jump to content
Larry Ullman's Book Forums

olaoyesunday

Members
  • Content Count

    28
  • Joined

  • Last visited

Community Reputation

0 Neutral

About olaoyesunday

  • Rank
    Member
  1. Upon re-written of the SQL below I got this error: #1067 - Invalid default value for 'date_modified' but When I removed "DEFAULT '0000-00-00 00:00:00' " the SQL ran successfully. I want to know if I am correct or not but Based on the link you sent I think I am on the way " For the first column that uses the TIMESTAMP data type in a specific table, MariaDB automatically assigns the following properties to the column: • DEFAULT CURRENT_TIMESTAMP • ON UPDATE CURRENT_TIMESTAMP. CREATE TABLE `carts` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `user_session_id` CHAR(32) NOT NULL, `product_type` enum('coffee','goodies') NOT NULL, `product_id` MEDIUMINT(8) UNSIGNED NOT NULL, `quantity` TINYINT(3) UNSIGNED NOT NULL, `date_modified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', ` date_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `product_type` (`product_type`,`product_id`), KEY `user_session_id` (`user_session_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  2. Dear all. I am having SQL issues with Table Carts and Wish_lists table on page 189, 192. the date_modified column was given error it was saying MySQL said: #1067 - Invalid default value for 'date_modified' should I just remove TIMESTAMP Data type from date_modified column and change it to DATETIME?. I am using Maria DB 10.3.15 version bundled with xampp.
  3. the original template. I just want to follow everything in the book step by step as explained.
  4. Hi sir, I could not find the coffee template that you chose for the Part three of this book before breaking them into PHP files in the code that I downloaded. pls, can we get it, I want to really follow where you got the box that you converted to Constant on page 210.
  5. Thanks very much, I am reading a javascript book and is pointing me towards the right direction. If I need any further assistance on this I will post it in any javascript forum. but I'm still coming with a lot of questions on php when I am through with reading PHP and MySQL for Dynamic Web Sites, Fifth Edition
  6. Hi everybody, I want to write a php code that extract numbers say 4567 from an image when you press scan button and then sum the numbers together. I have used one javascript library but I'm having problem in converting the numbers into an array. pls. I need an help urgently.
  7. Abiagail I wrote the two queries, I would have posted it but this text editor does not allow to copy and paste I wouldn't know why it is preventing me from pasting? or is there any other way to paste on this particular text editor?
  8. Thank you Bill. My problem is on how to insert into two tables simultaneously, I tried inserting into orders table after the line 100 in the registration.php which read $uid = mysqli_insert(dbc,q); $_SESSION['reg_user_id'] = $uid; but it is not working. You know what I need to know is how to insert into multiple table simultaneously. i.e users and orders table upon knowing the user_id
  9. Please, I want to ask if I want to be using FPDF to water mark the pdf, is it going to be dynamic (i.e a code will be doing adding customer's name on the fly) or I will be doing it manually after I am alerted by customers order?
  10. Dear Admin, In chapter 6 The payment gateway that I am using want me to insert transaction id, amount , payment status to my order table before sending it to their payment gateway and on my thanks php they want me to compare the transaction_id returned from their site with the one in my database before the receipt is shown or printed. please, where do I place the code : INSERT INTO orders (user_id, transaction_id, payment_status, payment_amount) in my registration script before sending captured information to the payment processor?
×
×
  • Create New...