Location: PHPKode > projects > phpBook > doc/update_smilies_1.50-1.60.php
<?
#######################################################################################
# 
# File to upgrade phpBook from 1.50 to 1.60
#   Enter SQL Info to your Datebase below..
# DELETE THIS FILE AFTER UPDATING
$host       = "localhost";
$database   = "phpBook";
$username   = "mysql_username";
$password   = "mysql_password";
#
#######################################################################################


mysql_connect($host, $username, $password) or die ("Database connect Error");
    @mysql_select_db($database) or die ("Database select Error");

	mysql_query("DROP TABLE IF EXISTS smilies");
	
	mysql_query("
	CREATE TABLE smilies (
		code char(3) NOT NULL,
		file varchar(20) NOT NULL,
		name varchar(25) NOT NULL
	) TYPE=MyISAM
	") or die ("ERROR : Could not create table");
	
	mysql_query("INSERT INTO smilies VALUES ( ':-)', 'smile.gif', 'Smile')");
	mysql_query("INSERT INTO smilies VALUES ( ';-)', 'wink.gif', 'Wink')");
	mysql_query("INSERT INTO smilies VALUES ( ':-(', 'frown.gif', 'Frown')");
	mysql_query("INSERT INTO smilies VALUES ( ':-P', 'teaser.gif', 'Teaser')");
	mysql_query("INSERT INTO smilies VALUES ( ':-D', 'grin.gif', 'Grin')");
	mysql_query("INSERT INTO smilies VALUES ( 'O:)', 'angel.gif', 'Angel')");
	mysql_query("INSERT INTO smilies VALUES ( ':-@', 'angry.gif', 'Angry')");
  mysql_query("INSERT INTO smilies VALUES ( ':fg', 'flaming.gif', 'Flaming')");
	mysql_query("INSERT INTO smilies VALUES ( ':-$', 'blush.gif', 'Blush')");
	mysql_query("INSERT INTO smilies VALUES ( ':-S', 'confused.gif', 'Confused')");
	mysql_query("INSERT INTO smilies VALUES ( ':*(', 'crying.gif', 'Crying')");
	mysql_query("INSERT INTO smilies VALUES ( '%-)', 'crazy.gif', 'Crazy')");
	mysql_query("INSERT INTO smilies VALUES ( '8-O', 'shocked.gif', 'Shocked')");
	mysql_query("INSERT INTO smilies VALUES ( ':-/', 'skeptical.gif', 'Skeptical')");
	mysql_query("INSERT INTO smilies VALUES ( ':-O', 'surprised.gif', 'Surprised')");
	mysql_query("INSERT INTO smilies VALUES ( ':-X', 'uptight.gif', 'Uptight')");
	mysql_query("INSERT INTO smilies VALUES ( ':))', 'happy.gif', 'Happy')");
	mysql_query("INSERT INTO smilies VALUES ( ':-!', 'annoyed.gif', 'Annoyed')");
	mysql_query("INSERT INTO smilies VALUES ( '8-)', 'cool.gif', 'Cool')");
	mysql_query("INSERT INTO smilies VALUES ( '>:)', 'devillish.gif', 'Devellish')");
	mysql_query("INSERT INTO smilies VALUES ( ':-B', 'geek.gif', 'Geek')");
	mysql_query("INSERT INTO smilies VALUES ( ':-<', 'glum.gif', 'Glum')");
	mysql_query("INSERT INTO smilies VALUES ( ':o)', 'happy_clown.gif', 'Happy Clown')");
	mysql_query("INSERT INTO smilies VALUES ( ':o(', 'sad_clown.gif', 'Sad Clown')");
	mysql_query("INSERT INTO smilies VALUES ( ':-|', 'indifferent.gif', 'Indifferent')");
	mysql_query("INSERT INTO smilies VALUES ( ':-*', 'kiss.gif', 'Kiss')");
	mysql_query("INSERT INTO smilies VALUES ( ':lo', 'love.gif', 'Loooove')");
	mysql_query("INSERT INTO smilies VALUES ( '(-:', 'lefthand_smile.gif', 'Left Hand Smile')");
	mysql_query("INSERT INTO smilies VALUES ( '$-)', 'money.gif', 'Money!')");
	mysql_query("INSERT INTO smilies VALUES ( '=-)', 'narroweyed_smile.gif', 'Narrow Eyed Smile')");
	mysql_query("INSERT INTO smilies VALUES ( 'X-P', 'offended.gif', 'Offended')");
	mysql_query("INSERT INTO smilies VALUES ( 'X-D', 'punch-drunk.gif', 'Punch-Drunk')");
	mysql_query("INSERT INTO smilies VALUES ( ':ba', 'barf.gif', 'Barf!')");
?>
Return current item: phpBook