Welcome Guest, Not a member yet? Register   Sign In
create a blog under 20 minutes problem...
#3

[eluser]iLoveChocolate[/eluser]
Below is the code, I copied from the tutorial.

there are 1 database and 2 tables:

DB name = blog
Table name = comments, entry

copy paste the comments SQL below into MYSQL:

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;


CREATE TABLE IF NOT EXISTS `comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`entry_id` int(11) NOT NULL,
`body` text NOT NULL,
`author` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;'

------------------------------------------------------------------------------------------

Copy paste the entry SQL into the MYSQL

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;


CREATE TABLE IF NOT EXISTS `entry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(128) NOT NULL,
`body` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

INSERT INTO `entry` (`id`, `title`, `body`) VALUES
(1, 'My First Post', 'Im a Millionaire'),
(2, 'My Second post', 'Im going to become a Multi Millionaire when I am 22');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;


Messages In This Thread
create a blog under 20 minutes problem... - by El Forum - 03-30-2010, 12:41 PM
create a blog under 20 minutes problem... - by El Forum - 03-30-2010, 01:10 PM
create a blog under 20 minutes problem... - by El Forum - 03-30-2010, 02:20 PM
create a blog under 20 minutes problem... - by El Forum - 03-30-2010, 02:23 PM
create a blog under 20 minutes problem... - by El Forum - 03-30-2010, 02:23 PM
create a blog under 20 minutes problem... - by El Forum - 03-30-2010, 02:25 PM
create a blog under 20 minutes problem... - by El Forum - 04-18-2010, 10:33 PM
create a blog under 20 minutes problem... - by El Forum - 04-19-2010, 12:34 PM
create a blog under 20 minutes problem... - by El Forum - 04-19-2010, 03:47 PM
create a blog under 20 minutes problem... - by El Forum - 04-19-2010, 03:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB