MSSQL Server and PHP connection
The code is as follows
Copy Code
$MCN = Mssql_connect (' 127.0.0.1 ', ' sa ', ' 1 ');mssql_select_db (' HB ', $MCN);
MySQL database connection
code is as follows
///Access library convert to MySQL database tutorial The friend who does not understand can add qq:345838256///////////////////////////////////I collect data is access, But my program is MySQL, so write a program, the program three steps to share ...
Test Libmysql tutorials are copied into windows/system32 and Libmysql.dll under Apache/bin.Of course, the most convenient way is:In Apache:LoadFile d:/php Tutorial/php5.2.13/libmysql.dllOnly above this line, MySQL can be successfully misappropriated.
Windows System configuration MySQL
Unable to connect to MySQL, wrote a test MySQL PHP file as follows:
The code is as follows
Copy Code
if (! $link) echo "Failed!";Elseecho "Success!" Mysql_close ();?>
Results
100m/versatile/mssql/mysql/ftp/can be bound rice space
Free universal SpacePrice: 0 RMB※ Web Space 100M, give a 20M database, limited resources, each user can only apply for one;※ Independent FTP Account 1, IIS connection is unlimited, the flow is
miarroba.com Free 100M Web page space, unlimited traffic, a single file maximum limit of 5M, support PHP5, free MySQL database, support FTP and Web upload management files, can customize 404 error page, provide a free level two domain name, but do
There are a number of third-party sources on the web, upgrade MySQL at the same time, will also upgrade PHP, if only want to upgrade MySQL look below1,mysql Official Source Address
Http://repo.mysql.com/yum
The latest is 5.7, see your preferences
The simplest kind of joint query
The code is as follows
Copy Code
SELECT * FROM table1 N, table2 i WHERE n.itemid = I.itemid
Cases
Promotion Site Table promotion_addr field: Name,id
Telephone report
Workaround:
Start--> run-->cmd--> into the DOS command form: (if the command cannot be executed, place the MySQL installation path at the front of the system variable path)
1. Character set settings for fields in a database table. Show CREATE
CONCAT (STR1,STR2,...)
Returns a string resulting from a connection parameter. If any of the arguments are null, the return value is null.
For example:SELECT CONCAT (CAST (Int_col as CHAR), Char_col)
MySQL Query date and time:
The
MySQL with its own features.
MySQL Full-text search syntax
The code is as follows
Copy Code
SELECT fields list from table WHERE MATCH (Col1,Col2,...) Against (Expr[Search_modifier])Search_modifier:{In BOOLEAN MODE |
MySQL exceeded the maximum number of connections, I believe many people first reaction is to view the MySQL process, see if there is a slow query, of course, this approach is entirely correct!But most of the time the real problem isn't here.Today
Import 1G of data, but in how not to import, with the command line can be easily done. Use the MySQL source command to import larger files.
The code is as follows
Copy Code
Mysql>use dbtest;Mysql>set names
Group_concat () calculates which rows belong to the same group and displays the columns that belong to the same group. Which columns to return, by letter
The number parameter (that is, the field name) is determined. Groupings must have a standard,
MySQL does not support the SELECT INTO statement directly back up the table structure and data, due to the need to find a way on the internet can be replaced, there are other ways to deal with, summed up as follows:
Method 1:MySQL does not support:
installing MySQL
The screenshot used is the MySQL 5.5 installation process, and 5.6 not much difference.
1. Confirm the installation of the Microsoft. NET Framework v4.0 Framework
The following illustration suggests:
If the. Net Framework
1.c# Winform connect MySQL to new MySQL, read data operation, use Mysql.MySql.Data component for data connection and operation2.mysql Tutorial version of the lower 4.01 cannot be configured for the MySQL environment
Source:
http://www.dezai.
Recently, because the project needs to configure the mysql + php + apache environment, the steps are relatively simple and listed as follows:1. Installation Command: apt-get install apache2After changing the configuration, restart:/etc/init.
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