易截截图软件、单文件、免安装、纯绿色、仅160KB

怎么把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 bug??global发现的问题

如下php代码
<?php
$type='a';
$target='type';
$a=array(1,2,3);
a($target);
function a($type)
{
    global $$type;
    var_dump($$type);
}
?>
预计输出的是string(1)”a”
可是结果是
Notice: Undefined variable: a in D:\web\global.php on ......

SQL server 2005 开始安装后sa无法登录问题

1.使用Management Studio Express,用“Windows身份验证”登录,选中SQL服务器名,右击鼠标选择属性,在服务器属性选项页面,选择“安全性”,将服务器身份验证由“Windows身份验证”改为“SQL Server和Windows身份验证”,单击确定。
 2.使用SQL  Server 2005外围应用 ......

sql server 2000导出表结构

sql server 2000导出表结构
1.
SELECT   
表名=case when a.colorder=1 then d.name else '' end,   
表说明=case when a.colorder=1 then isnull(f.value,'') else '' end,   
字段序号=a.colorder,   
字段名=a.name,   
标识=case when COLUMNPROPERTY( a.id, ......

sql 分页语句

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当前第几页
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号