.支持库 mysql
.支持库 Exmlrpc
.支持库 iext
数据库句柄 = 连接MySql ((“123.1.179.2”, “root”, “ceshi”, “xinxi”, 2306)
文本数组 = 分割文本 (去标示符串, “&”, )
记录集句柄 = 查找记录 (数据库句柄, “account”, “username,password”, “username='” + 文本数组 [1] + “'”, “id DESC”)
.如果 (取记录集行数 (记录集句柄) < 1) ' < 1就是未找到数据
释放记录集 (记录集句柄)
服务器.发送文本 (客户句柄, “登陆” + “此账号未注册”)
.否则
到首行 (记录集句柄)
读字段值 (记录集句柄, “password”, 密码)
.如果 (密码 ≠ 文本数组 [2])
服务器.发送文本 (客户句柄, “登陆” + “账号密码错误”)
.否则
释放记录集 (记录集句柄)
服务器.发送文本 (客户句柄, “登陆” + “账号密码正确”
.
.如果结束
.如果结束
.如果结束
断开MySql (数据库句柄)
2306是端口号 文本数组[1]是账号 文本数组[2]是密码 你的少个端口号
这表结构字段属性设计的很糟糕,建议修改!mysql> create table publish (number int(8),user varchar(20),name varchar(20),phone int(12),title text,content text ,list int(1),things varchar(20),quality varchar(20),glance int(5),trad varchar(20),classify varchar(6),city_id int(6),exchange varchar(6),town_id int(5),town varchar(20),ex_he varchar(20),my_ex varchar(50),photo int(2),ip int(12),time int(10))
Query OK, 0 rows affected (0.02 sec) mysql> insert into publish (number,user,name,phone,title,content,list,things,quality,glance,trad,classify,city_id,exchange,town_id,town,ex_he,my_ex,photo,ip,time) values (1,'2','3',4,'5','6',7,'8','9',10,'11','12',13,'14',15,'16','17','18',19,20,21)
Query OK, 1 row affected (0.01 sec) mysql> select * from publish
+--------+------+------+-------+-------+---------+------+--------+---------+--------+------+----------+---------+----------+---------+------+-------+-------+-------+------+------+
| number | user | name | phone | title | content | list | things | quality | glance | trad | classify | city_id | exchange | town_id | town | ex_he | my_ex | photo | ip | time |
+--------+------+------+-------+-------+---------+------+--------+---------+--------+------+----------+---------+----------+---------+------+-------+-------+-------+------+------+
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
+--------+------+------+-------+-------+---------+------+--------+---------+--------+------+----------+---------+----------+---------+------+-------+-------+-------+------+------+
1 row in set (0.00 sec)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)