设为首页收藏本站

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 2066|回复: 6
打印 上一主题 下一主题

阿根廷风暴主页改版招贤专贴(熟悉mysql的阿迷请入)

[复制链接]
跳转到指定楼层
1#
发表于 2008-12-7 22:43:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
阿根廷风暴现在的主页是蝶儿2003年开发的,当时改版非常成功。五年过去了,我们将于近期对风暴的整个主页程序进行改版 新主页程序将采用discuz的UCenter平台,争取在保留老优点的前提下,有所突破。

改版目前碰到的一个难题是需要把原来新闻的sql数据库导成mysql数据库,工作量很大。现急需了解mysql数据库的阿迷帮助、参与到新闻数据库转换工作。(主要工作是把从02年开始到现在的sql数据库,按照mysql格式要求进行字段、格式的转换)

请大家按照以下跟贴形式报名:

论坛ID:
所在城市:
联系方式(qq、msn、手机都可):
mysql了解程度(略通、熟悉):


改版也需要美工、页面、程序设计方面人手,如果你在这方面有心得,也欢迎报名
论坛ID:
所在城市:
联系方式(qq、msn都可):
擅长(页面设计、程序设计、美工):

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
收藏收藏 转播转播 分享分享 分享淘帖
2#
发表于 2008-12-8 04:22:18 | 只看该作者
工作量主要是对新老数据库表的熟悉,并且需要大量的测试。导风暴的这些新闻数据本身只需要数分钟的时间。
回复 支持 反对

使用道具 举报

3#
发表于 2008-12-8 08:33:58 | 只看该作者
There are many tools can be used to migrate data into mysql database. One of the simplest tool is the command line of mysql.
It's quick and easy to load text data into mysql from text file, which can be easily exported from sql server by DTS. However, the real data migration is never so straight forward. We will need some time fiddling and testing.



Below is the example of import text file into a table.



-- create a test file, c:/mysql/tmp/testnews.txt:

1|First News||2008-12-07 11:08:12
2|Second News| There is no news|2008-12-08 10:08:12
3|Welcome mysql|Mysql is a very good database, as good as others.|2008-12-08 11:08:12



-- Create table and load the text file

mysql> create table test_news
    -> (
    -> news_id int,
    -> title varchar(200),
    -> news varchar(20000),
    -> news_date datetime
    -> );
Query OK, 0 rows affected (0.17 sec)

mysql> desc test_news;
+-----------+----------------+------+-----+---------+-------+
| Field     | Type           | Null | Key | Default | Extra |
+-----------+----------------+------+-----+---------+-------+
| news_id   | int(11)        | YES  |     | NULL    |       |
| title     | varchar(200)   | YES  |     | NULL    |       |
| news      | varchar(20000) | YES  |     | NULL    |       |
| news_date | datetime       | YES  |     | NULL    |       |
+-----------+----------------+------+-----+---------+-------+
4 rows in set (0.03 sec)

mysql> LOAD DATA LOCAL INFILE 'c:/mysql/tmp/testnews.txt'
    -> into table test_news
    -> FIELDS TERMINATED BY '|'
    -> LINES TERMINATED BY '\r\n';
Query OK, 3 rows affected (0.01 sec)
Records: 3  Deleted: 0  Skipped: 0  Warnings: 0

mysql> select * from test_news;
+---------+---------------+---------------------------------------------------+---------------------+
| news_id | title         | news                                              | news_date           |
+---------+---------------+---------------------------------------------------+---------------------+
|       1 | First News    |                                                   | 2008-12-07 11:08:12 |
|       2 | Second News   |  There is no news                                 | 2008-12-08 10:08:12 |
|       3 | Welcome mysql | Mysql is a very good database, as good as others. | 2008-12-08 11:08:12 |
+---------+---------------+---------------------------------------------------+---------------------+
3 rows in set (0.00 sec)
回复 支持 反对

使用道具 举报

4#
发表于 2008-12-8 09:13:47 | 只看该作者
Another test, the TEXT type works the same as varchar.

mysql> create table test_news2
    ->    (
    ->    news_id int,
    ->    title varchar(200),
    ->    news MEDIUMTEXT,
    ->    news_date datetime
    ->    );
Query OK, 0 rows affected (0.05 sec)

mysql>    LOAD DATA LOCAL INFILE 'c:/mysql/tmp/testnews.txt'
    ->     into table test_news2
    ->     FIELDS TERMINATED BY '|'
    ->     LINES TERMINATED BY '\r\n';
Query OK, 3 rows affected (0.00 sec)
Records: 3  Deleted: 0  Skipped: 0  Warnings: 0

mysql>  select * from test_news2;
+---------+---------------+---------------------------------------------------+---------------------+
| news_id | title         | news                                                           | news_date           |
+---------+---------------+---------------------------------------------------+---------------------+
|       1 | First News    |                                                                  | 2008-12-07 11:08:12 |
|       2 | Second News   |  There is no news                                 | 2008-12-08 10:08:12 |
|       3 | Welcome mysql | Mysql is a very good database, as good as others. | 2008-12-08 11:08:12 |
+---------+---------------+---------------------------------------------------+---------------------+
3 rows in set (0.00 sec)
回复 支持 反对

使用道具 举报

5#
发表于 2008-12-8 12:01:16 | 只看该作者
论坛ID:Ushuaia/乌斯怀亚
所在城市:武汉,假期在沈阳
联系方式(qq、msn、手机都可):QQ:39007881
mysql了解程度(略通、熟悉):熟悉
另外对页面、美工、程序设计也有一定研究,不过不懂php
回复 支持 反对

使用道具 举报

6#
发表于 2008-12-9 12:54:24 | 只看该作者
论坛ID:afa2006
所在城市:上海
联系方式(qq、msn、手机都可):13818219854
mysql了解程度(略通、熟悉):熟悉
回复 支持 反对

使用道具 举报

7#
发表于 2008-12-11 16:46:49 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|阿根廷风暴 ( 沪ICP备05003678号   

GMT+8, 2024-5-19 20:48 , Processed in 0.078125 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表