source code of MES Data

<HTML>
<HEAD>
<TITLE>TELOGS</TITLE>
</HEAD>
<BODY>
<?php
	/* command line parameters:  wget "http://localhost/query.php?action=query&sn=123" -O get1.html */

	$act=$_GET["action"];
	/* http://localhost/query.php?action=query&sn=123  */
	if ($act == "query"){
		$serialnumber=$_GET["sn"];

		$con = mysql_connect("localhost","root","123456");
		if (!$con){
			die('Could not connect: ' . mysql_error());
		}

		mysql_select_db("test", $con);
		$sql = "SELECT * FROM testlogs where Serial_number='".$serialnumber."'";
		$result = mysql_query($sql);
		if (mysql_num_rows($result) != "0" ){
			while($row = mysql_fetch_array($result))
			{
				echo $row['Serial_number'] . "|" . $row['Mac_addr']."|". $row['OA_KEY']."\n";
			}
		}else{
			echo "No data of this serial number=".$serialnumber;
		}
		mysql_close($con);
	}
?>

<?php
	/* http://localhost/query.php?action=add&sn=123&mac=eeee&oakey=123   */
	if ($act == "add"){

		$serialnumber=$_GET["sn"];
		$macaddr=$_GET["mac"];
		$oakey=$_GET["oakey"];

		$con = mysql_connect("localhost","root","123456");
		if (!$con){
			die('Could not connect: ' . mysql_error());
		}

		mysql_select_db("test", $con);
		$sql="INSERT INTO testlogs (Serial_number, Mac_addr, OA_KEY) values ('".$serialnumber."',"."'".$macaddr."',"."'".$oakey."')";
		if(mysql_query($sql)){
			echo "Add data Passed";
		}else{
			echo "Add data failed";
		}
		mysql_close($con);
	}
?>
</BODY>
</HTML>

时间: 2024-10-12 07:30:46

source code of MES Data的相关文章

Map Data to Source Code

Map Data to Source Code 仪器需要有关项目的准确信息以提供最佳结果.如果系统可以看到与项目相关联的所有符号,则获得最完整的信息.当由工具分析工具生成的跟踪文档中显示地址而不是符号时,您可以手动提供丢失的信息.地址到符号的映射是包含在一个dsym文件.通常情况下,仪器自动发现dsym文件,基于你在聚光灯的指标和仪器的喜好指定路径的位置.然而,你可以点工具在正确的方向,当它不能自动找到一个dsym.一旦完成,仪器就可以将地址映射到相关联的符号和行号信息.Instruments

CRC32 Source Code

/* The Quest Operating System * Copyright (C) 2005-2010 Richard West, Boston University * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Softwar

android activity 启动过程分析(source code 4.4)

说实话,android source code从2.3到4.4变化是蛮多的,尤其是media部分,虽然总的框架是没有多大变化,但是找起代码来看还是挺麻烦的.在android里面最受伤的是使用了java,jni,jvm,Nativity c++等等,各种设计模式横行,当然在学习源码过程中也意识了编程语言基础,数据结构,设计模式的重要性. android source code 经典的地方: 1. 大量使用了各种设计模式如单例模式,装饰模式,工程工厂模式,适配器模式等等. 2. 使用了binder驱

MySQL 5.7.18 Source Code Installation

1  下载 1.1 下载网址: www.mysql.com 1.2 下载方法 1.2.1 进入主页后,选择 DOWNLOADS ,这时我们进入了下载页面.如下载的网址所示https://www.mysql.com/downloads/ 1.2.2 进入下载页面后,可以看到很多产品,这里我们将滚动条拉到最下面. 我们要下载的是MySQL Community Edition(GPL) 1.2.3 进入MySQL Community后. selecting operating system选择Sour

How to compile and install Snort from source code on Ubuntu

http://www.tuicool.com/articles/v6j2Ab Snort is by far the most popular open-source network intrusion detection and prevention system (IDS/IPS) for Linux. Snort can conduct detailed traffic analysis, including protocol analysis, packet content search

Memcached source code analysis -- Analysis of change of state--reference

This article mainly introduces the process of Memcached, libevent structure of the main thread and worker thread based on the processing of the connection state of mutual conversion (not involving data access operations), the main business logic is t

12 Source Code Profilers for C &amp; C++

Source :http://open-tube.com/12-source-code-profilers-for-cc/ Code Profilers are very distinct from traditional debuggers. They are able to catch the trivial and non fatal coding errors which are often hard for humans to catch. These trivial bugs lat

Memcached source code analysis (threading model)--reference

Look under the start memcahced threading process memcached multi-threaded mainly by instantiating multiple libevent, are a main thread and n workers thread is the main thread or workers thread all through the the libevent management network event, in

HashMap source code view(1)

前言 HashMap source code view 类注释 Hash table based implementation of the Map interface. This implementation provides all of the optional map operations, and permits null values and the null key. (The HashMap class is roughly equivalent to Hashtable, ex