Learning PHP and MySQL

Wednesday, September 27, 2006

Example 16-9 Inserting sample data for the tables

INSERT  INTO  categories  VALUES  (1,'Press  Releases'); INSERT  INTO  categories  VALUES  (2,'Feature  Requests');

INSERT  INTO  posts  VALUES  (NULL,1,1,'PHP  Version  12','PHP  Version  12,  to  be released  third  quarter  2006.  Featuring  the  artificial  inteligence  engine  that writes  the  code  for  you.',NULL);
INSERT  INTO  posts  VALUES  (NULL,1,1,'MySQL  Version  8','Returns  winning  lotto number.',NULL);
INSERT  INTO  posts  VALUES  (NULL,2,2,'Money  Conversion','  Please  add  functions for  converting  between  foreign  currentcies.  ',NULL);

INSERT  INTO  comments  VALUES  (NULL,1,1,'Correction','Release  delayed  till  the year  2099',NULL);

INSERT  INTO  users  VALUES  (NULL,'Michele','Davis','mdavis',md5('secret')); INSERT  INTO  users  VALUES  (NULL,'Jon','Phillips','jphillips',md5('password'));

You should see a result similar to the one below for each of the INSERT SQL commands.

Query OK1 row affected1 warning (0.03  sec)

Posted by krautgrrl on 09/27 at 11:41 AM
Chapter 16 Code • (2) Comments • (4) TrackbacksPermalink

Statistics

This page has been viewed 375311 times
Page rendered in 0.1559 seconds
Total Entries: 224
Total Comments: 16
Total Trackbacks: 307338
Most Recent Entry: 09/27/2006 12:39 pm
Most Recent Comment on: 10/26/2007 10:00 am
Total Members: 2
Total Logged in members: 0
Total guests: 10
Total anonymous users: 0
Most Recent Visitor on: 02/11/2012 01:51 am
The most visitors ever was 1103 on 11/20/2007 12:50 pm

Referrers

Powered by ExpressionEngine