Package Pubcls;
Import java.sql.*;
/**
* MYSQL simple Operation class
* @author Itblt
*/
Public class Mysql
{
Public Connection Livecon = NULL ;
Public int dbwaittime = 3600;
Public String DbLang = "" ;
Win2K under the configuration Asp+cgi+php+mysql full Raiders
Support Asp+cgi+php+mysql
Install Win2K, install IIS
Indexing Service,
FrontPage Server Extensions,
Internet Service Manager (HTML)
These few do not wear, there are some other, in short,
Yesterday, when using phpMyAdmin to connect to MySQL, there was a #2002– server that was not responding (or the socket for the local MySQL server was not configured correctly), but I did not have any problems with the PHP connection.
The code is as follows
Copy Code
Class connectionmysql{HostPrivate $host = "localhost";Username of the databasePrivate $name = "root";Password of the databasePrivate $pass = "";Database namePrivate $table = "phptest";Encoded
Download First
Download Phpexcel file, address: phpexcel.codeplex.com/
Find the following similar code in the reader.php file (the first line is both) and change to the correct oleread.php path: require_once ' oleread.php ';
Then create a new PHP
Php
int value:Time (): is the number of seconds to return from the Unix era (GMT January 1, 1970 00:00:00) to the current period.We want to obtain the number of seconds from January 1, 1970 to 2012-2-10 can be achieved by strtotime (): namely:
Before you look at this article, make sure you've mastered some of PHP's knowledge and the basics of MySQL's query operation.
As a Web program, you often have to deal with countless numbers of data, for example, members of the data, the article data,
I. Data deletion
The code is as follows
Copy Code
Connecting to a database tutorial$link _id = mysql_connect ("localhost", "root", "") or Die ("Connection failed");if ($link _id){mysql_select_db ("My_test");if (!$_get[id]
//php and MySQL database connection code
The code is as follows
Copy Code
mysql_connect (' localhost ', ' root ', ' root ') or Die (' MySQL server stop or use password error! ');mysql_select_db (' cshouse ') or Die ('
For example, there is a requirement, through the SQL statement, to return a random integer of 5 to 5. If this one is in PHP, it is very simple and straightforwardPrint rand ( -5,5);?>In MySQL, the RAND function can have only one parameter. Excerpt
Building a table: the process of declaring a column
The code is as follows
Copy Code
CREATE TABLE Table name (Column name 1 column 2 Type column 1 parameter,Column Name 2 column 2 Type column 2
Login directly under the command line MySQL run show STATUS;
1, view MySQL server configuration information
The code is as follows
Copy Code
Mysql> Show variables;
2, view the MySQL server running the
First, the concept of the indexindexing is the way to speed up the retrieval of data in a table. The index of the database is similar to the index of the book. In books, the index allows users to quickly find the information they need without having
First, we have to pay attention.
1>mysql a query can only use one index at a time. If you want to use indexes on multiple fields, create a composite index.2> in an order by operation, MySQL uses indexes only if the sort criteria are not a query
Failed to create TABLE #1005Failed to create DATABASE #1006Failed to create database #1007 database already existsFailed to delete database #1008 database does not exist#1009 Unable to delete database file causes database failure to be deleted#1010
XML is used as the data exchange standard. Both Java and. NET support XML, but developers on other platforms do not have to worry about being abandoned by this technology. PHP is a popular script environment that supports XML. In this article, I
I. Reasons for using the view: 1: security. This is generally done: create a view, define the data operated on the view, and then bind the user permission to the view. 2: query performance is improved. 3: After flexible functions are required, you
In the actual environment, you need to back up and restore one or more tables from time to time (note: unless explicitly specified, all the tables mentioned here refer to InnoDB tables ), for the innodb engine to restore a single table, the overall
How does MySQL simplify external Union?In many cases, the expression of a table in the FROM clause can be simplified.During the analysis phase, queries with right outer join operations are converted to equivalent queries that only contain left join
// Define an array to store the results after deduplication$ Result = array ();// Read the uid list file$ Fp = fopen('test.txt ', 'r ');While (! Feof ($ fp )){ $ Uid = fgets ($ fp );$ Uid = trim ($ uid );$ Uid = trim ($ uid ,"");$ Uid = trim ($ uid ,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service