Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'sql'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Found 17 results

  1. Chapter 7: Advanced SQL and MySQL - Fifth Edition of PHP and MySQL for Dynamic Web Sites Visual QuickPro Guide Page 229 - Table 7.3 It says I don't understand the difference between lowering importance and lowering ranking. Doesn't decreasing the importance decrease the ranking? Can someone please explain to me the difference between the 2? Thanks, Varun
  2. Hello, Hope you are doing great. I belong to a web development community and recently got hired in a logo design company to manage their site development issues. Basically, the website is designed quite well without any front-end issues but it has some backend issues that needs to be fixed. As they have given me a new task to add up a CMS into the backend of their website. I have already worked on Word press so I know how to configure it but as they want it on Drupal platform, I don’t know much about it. Although I have used Drupal and other CMS sites too but never got a chance to configure it
  3. Hey when I import your SQL file into my database I get this error CREATE TABLE `users` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `type` ENUM('member','admin') NOT NULL DEFAULT 'member', `username` VARCHAR(45) NOT NULL, `email` VARCHAR(80) NOT NULL, `pass` VARCHAR(255) NOT NULL, `first_name` VARCHAR(45) NOT NULL, `last_name` VARCHAR(45) NOT NULL, `date_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `date_expires` DATE NOT NULL, `date_modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE INDEX `username_UNIQUE` (`username` A
  4. When I tried to run the downloaded SQL commands in phpMyAdmin, various error messages appeared, stating that no author table exists. So I searched for all occurrences of the word "author" and replaced them with "user", except for this line: `type` enum('public','author','admin') NOT NULL, Is this correct? The file I downloaded is: yiibook2_cms.sql.zip Thanks.
  5. Hi Larry, I'm looking at the customers tables design, page 188, and there is something I don't understand. For me it looks like the order_contents table can store only one item per order, with its product_id, quantity and price. But if an order contains several items, how can it be stored in the order_contents table with each product_id, quantity and price? Thank you Francois
  6. Hi, I hope everyone is well. When running the stored procedure for creating select_products below in phpMYADMIN I get the error: "#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 10". When I look at the line, the syntax seems to be correct. Line 10 is where "ORDER BY name ASC;" lies, and where the error message is stating the problem resides. Can anyone point me in the right direction? Many Thanks, CREATE PROCEDURE select_products(type VARCHAR(6), cat TINYINT) BEGI
  7. Dear Larry, I am the customer who purchase your book PHP and MySql for Dynamic Website 4th edition. Now I read chapter 9 and reach the section of Ensure Secure SQL. I found that we will use function mysqli_real_escape_string for a security reason. If you have a book in your hand please open to page 287 and read the line 40. $p = mysqli_real_escape_string($dbc, trim($_POST['pass1'])); From here I have a question. We use the mysqli_real_escape_string function to secure sql, so it mean some character might now allow to enter because of security reason. But in form password, user c
  8. Does Anybody know how do do this from end of 1st Q to the rest, Especially Creating the APis and Idexes and Bash code etc? 1. DB Schema Design - Design a basic database to store the following information + A fleet of Vehicles - Include details such as mileage, vin numbers etc + A pool of drivers - Include relevant documentation, e.g. Drivesr license, ID Book + A group of routes - Marking out GPS coords for directions etc. is not necessary, just include a start & end address as well as any other info you believe to be pertinent + A drivers sc
  9. in What Was Larry Thinking? #70 it is stated that "You should not index colums that: Allow NULL values" Could you please explain the reason for this?
  10. Just as a short note, the SQL commands to create the three tables for the real-world site project in chapter 15, pg. 556 caused errors in phpMyAdmin with MAMP. I removed all of the single quotation marks throughout the code and everything ran smoothly. I guess this is a phpMyAdmin issue or maybe I'm using a different version than that used in the book. Still love Mr. Ullman's books and have nearly all of them now! Thanks
  11. Can anyone help me get the sample data and SQL commands into Workbench? The book says "You can download the complete SQL commands, along with some sample data, from the account page on the book’s Web site." (Page 64) Are these files for use in MySQL Workbench? If so, how can I get the commands and sample data into Workbench? I have already opened the yii_cms.mwb fil in Workbench, and I can see the visual of the table relationships. But I don't know how to import the data and SQL commands. This is not obvious to me, since Workbench is new for me. I have already downloaded an
  12. Hi everybody. I have used the following code from http://www.yiiframework.com/wiki/361/simple-way-to-use-autocomplete-using-different-id-and-display-value/ . My table name is dog and I'm interested in three attributes: id, name and size. So far I have gotten an autocomplete field working which is populated with the name-attribute values as typed in by the end user. The following code does that: Under extensions: <?php Yii::import("zii.widgets.jui.CJuiAutoComplete"); class myAutoComplete extends CJuiAutoComplete { /** * Run this widget. * This method registers
  13. Chapter 3 of the 3rd Edition of this book includes some work with a database of US zipcodes borrowed from US census bureau or some similar organization. The database is located here (the smaller database): http://www.federalgo...mentzipcodes.us Some of the latitude and longitude values in the database are empty, which can be checked by running the following query: SELECT * FROM zip_codes WHERE latitude=''; Which outputs a number of results. (Showing rows 0 - 29 (648 total, Query took 0.0042 sec)) Larry offers to replace the empty values with NULL, by running this query
  14. Should we sanitize it or the db will handle it? $q = 'SELECT subject, body FROM messages WHERE MATCH(body, subject) AGAINST('<IMG SRC="javascript:alert('XSS');">')'; Can you please put it in an working example?
  15. I have a form with 30+ checkboxes which are named sf1, sf2 etc. and they are to be inserted into a table which has a column for each checkbox to store whether it was checked or not (type enum yes or no). I'll be doing various processing with this list of checkboxes and obviously want to use loops. As part of the validation process, I've created an array $sf, which holds the checked (or not) value of each checkbox and looks similar to $sf = array(1=>'yes','no','yes','no','yes','no','yes','no','no','yes','no','yes','no','yes','no','yes','no','yes','no','no','yes','no','yes','no','yes'
  16. I have the following database scenario: companies ------- companyID (PK) CompanyName jobs ------- jobID (PK) companyID (FK) description domains ----- domainsID (PK) jobID (FK) domains ('retail', 'it, 'management'...etc.) benefits ------ benefitsID (PK) jobID (FK) benefits ('free transport', 'health insurance'...etc.) Each job in jobs is posted by 1 company only, here I would like to limit the result to 1. Each job may have multiple domains. Each job may have multiple benefits. What would be the easiest way to retrieve the information for a specific job in jobs table? The
  17. An error occurred during a connection to www.mydomain.co.uk SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long) I am stuck on chapter 6. After signing into paypal sandbox, using the buyer account I created & then clicking the 'go back to my site button,' I got the following error above. How do I solve this please?
  • Create New...