How to add a form to a table and submit a MySQL database
I am a novice, now want to do an indicator submission system, MySQL database has the overall structure of sales, and has been in PHP in accordance with the login account automatically generated corresponding sales subordinates, but the structure followed by sales
Php application instance-add data to MySQL data table 1. source code of insert.htm:
Insert
Score Data Table-add data records
2. Insert. php source code:
Insert
Mysql_connect ("ftp", "root ","");Mysql_select_db ("test ");$ SQL = "insert into score (Number,
C # It is okay to connect to Mysql to read tables and create tables. However, an error is prompted when calling the MySQLInsertCommand method: "PInvoke function" MySQLDriverCS! The call to MySQLDriverCS. CPrototypes: mysql_real_escape_string causes stack asymmetry. The reason may be that the hosted PInvoke signature does not match the non-hosted target signature. Check whether the call conventions and parameters of the PInvoke signature match the non-
Build table:DROP TABLE IF EXISTS Bulletin;CREATE TABLE Bulletin (ID INT not NULL PRIMARY key auto_increment, # PRIMARY keyUID INT (one) not NULL DEFAULT 0, # Creator IDContext VARCHAR (+) not NULL DEFAULT ', # Announcement details (300 words)BeginTime DEC not NULL DEFAULT 0, # Announcement start timeEndtime DEC not NULL DEFAULT 0, # Announcement end timeCreatetime DEC not NULL DEFAULT 0, # creation timeModi
Tags: Data rom primary key IDE entity insert Max Sele returnTable level, whose primary key is lid1.select Max (ID) from tableQuery statement: SELECT MAX (lid) from levelReturn Insert PRIMARY Key2.select last_insert_id (ID) from tableQuery statement: SELECT last_insert_id (lid) from level;Returns a list of primary keys, with the last value inserting a primary key3.select @ @identity from tableQuery statement: SELECT @ @identity from levelReturns N (the number of rows in a
Label:I. Establishment of the tableCREATE TABLE Student
(
numberkey,//The primary key does not necessarily tick on the self-increment, but the hook on the self-increment must be the primary key.)
name varchar (null,//design interface, non-null constraint
sex bit,
height decimal (8,2), // Total 8 digits, 2 digits
after the decimal point birthday datetime
)Decimal type float Double decimalString varchar--------Consider lengthTh
Check to see if the MySQL database federated engine is turned on.Show engines;If the federated is not turned on, add federated to mysqld in MySQL configuration file my.cnf. The user who adds the remote Access database in the remote database creates the table "Work_step_apply_check '" (' ID ' varchar () ' Not NULL DEFAU
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.