文件名称:socket身份校验(存储过程)mysql数据库
文件大小:1.47MB
文件格式:ZIP
更新时间:2015-07-27 04:40:34
socket 身份校验 存储过程 mysql数据库
服务器端导入MySql.Data.dll包并using MySql.Data.MySqlClient; 用mysql的存储过程查询表中的数据 mysql数据库 tb_users表 use test; DROP TABLE IF EXISTS tb_users; CREATE TABLE IF NOT EXISTS tb_users ( id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, password VARCHAR(50) NOT NULL, name VARCHAR(30) NOT NULL ); Insert into tb_users(name, password) values('ad', 'admin'); Insert into tb_users(name, password) values('a', 'abc'); Insert into tb_users(name, password) values('e', 'adm'); Insert into tb_users(name, password) values('123', '456'); Select * from tb_users; 存储过程 delimiter $ DROP PROCEDURE p1$ CREATE PROCEDURE p1(in xname varchar(30),in xpassword varchar(50),out xid integer) begin select id into xid from tb_users where name =xname and password=xpassword; end $ 查询数据库中的所有存储过程 delimiter ; select name,db from mysql.proc; delimiter $ DROP PROCEDURE p2$ CREATE PROCEDURE p2(in xname varchar(30),out xpassword varchar(50)) begin select password into xpassword from tb_users where name =xname; end $ delimiter ; select name,db from mysql.proc;
【文件预览】:
socket身份校验(存储过程)
----CheckSocketClient()
--------CheckSocketClient()
--------CheckSocketClient.suo(19KB)
--------CheckSocketClient.sln(941B)
----CheckSocketServer()
--------CheckSocketServer.sln(941B)
--------CheckSocketServer.suo(20KB)
--------CheckSocketServer()