怎么把powerdesigner导出的sql用PHP导入MysQL数据库
我们知道用powerdesigner导出的sql文件后缀为'.sql';用phpmyadmin很容易导入MysQL数据库,但是用PHP怎么导入数据库呢?
我用powerdesigner设计一个数据库后导出sql文件(一个投票系统)为'vote.sql';
文件内容为(一些sql语句和注释):
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2010-4-22 17:11:50 */
/*==============================================================*/
drop table if exists account_charge;
drop table if exists account_cost;
drop table if exists account_info;
drop table if exists charge_way;
drop table if exists user_askanswer;
drop table if exists user_info;
drop table if exists vote_fake;
drop table if exists vote_info;
drop table if exists vote_item;
drop table if exists vote_title;
drop table if exists vote_type;
/*==============================================================*/
/* Table: account_charge */
/*==============================================================*/
create table account_charge
(
chargeid int not null,
chargewayid int not null,
accountid
相关文档:
PHP环境配置心得
Apache的配置
首先我在http://httpd.apache.org/download.cgi下的是“Win32 Binary without crypto (no mod_ssl) (MSI Installer): httpd-2.2.15-win32-x86-no_ssl.msi”。安装那是小儿科啦,下一步下一步。我就不说了。
安装完后就要开始配置了, ......
上一篇我们讲到链接到 Edit.php?id= 来修改数据,后来我想了一下,其实也可以直接利用 Input.php 来修改数据,这样更容易管理,节省了不必要的空间
Input.php可以这样链接:Input.php?id=[Num]&action=[Num]
id即记录ID,默认为-1
action为动作,默认为0 , 为0时代表添加新的记录,为1时则修改记录
In ......
1. 安装mysql的时候选择字符集utf8
2. 安装结束后修改my.ini,有两个地方要修改,
[mysql] default-character-set=gbk
# The default character set that will be used when a new schema or table is
# created and no character set ......
首先,用windows 身份验证 登陆 sql server 2005
依次展开
安全性->登录名
选中 sa 右键单击
选中 属性
弹出 sa 的属性对话框
就在密码处 改 密码 行了
改了密码后 用 sa 和 你改的密码登陆
如果还登陆不上
就是你没打开 sql server和 windows身份验证
和没授予 sa 登陆权限
解决办法如下
:::: ......
1. select top pageSize
* from table where id not in(select top((pageNo-1)*pageSize
) id from table order by id asc)
2. select * from table where id<=pageSize*pageNo
and id>(pageNo-1)*pageSize
order by id asc
注:
pagesize每页显示的记录数
pageNo当前第几页
......