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

php教程:mysql的常用语句

关于 PHP 教程的文章已经很多了,今天给大家介绍几个常用的MYSQL语句。
显示数据库或表:
show databases;//然后可以use database_name;
show tables;
更改表名:
alter table table_name rename new_t;
添加列 :
alter table table_name add column c_n column attributes;
删除列:
alter table table_name drop column c_n;
创建索引:
alter table c_table add index (c_n1,c_n2);
alter table c_table add unique index_name(c_n);
alter table c_table add primary key(sid);
删除索引:
alter table c_table drop index c_n1;
更改列信息:
alter table t_table change c_1 c_1 varchar(200);
alter table t_table modify 1 c_1 varchar(200);
insert插入语句:
insert into table_name (c_1,c_2)
values ('x1',1);
update语句:
update table_name set c_1 =1 where c_2=3;
删除数据库或者表:
drop table table_name;
drop database database_name;//使用mysql_drop_db()可以删除的.


相关文档:

PHP Cookie与Session跨域访问、传递


晚上特意花了个时间,自己动手试了下。
在项目中一直碰到Cookie跨域访问及SessionId跨域传递问题
范例:
index.php
<?php
include_once('a.php');
session_start();
$_SESSION['k'] = uniqid();
setcookie("sess", session_id(), time()+3600, "/", ".ipggg.com");
echo "index.php<br />\n";
echo $ ......

PHP中采用POST方式发送数据

最近两天项目需要,由于服务器正在开发,客户端进度稍快一些,没有服务器进行联调。因此我重操旧业,用PHP快速的写了一些web页面,算是当测试桩程序了,七八个web接口,基本上5到6个小时搞定了。由于当前的服务器需要与其他服务器进行对接,因此写的这个web服务还需要充当client角色,向其他服务器发送请求。
在网上搜了一 ......

PHP学习

 前几天在学习PHP的时候做了一个简单的数据增删改的程序,由于自己是第一次接触PHP所以在许多地方做的不到位,感觉很牵强,但是毕竟是花了时间的,所以现在贴出来。
1.完成增删查改的主页面:connsql.php
 <h1>Data Insert Delete Update</h1>
<?php
    //获得数据库连接
& ......

windows下apache,mysql,php安装日记

今天废了一天的时间来从新把环境搭建好:做个笔记
安装顺序:
apache->php->mysql
一些注意的地方记下来吧:
1. apache 支持 php
    apache 配置文件下:需要修改的地方:
       i.  PHPIniDir "F:/programs/php/"
    &n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号