注å页é¢åºç°Column count doesn't match value count at row 1
程序员文章站
2022-04-20 09:30:13
...
session_start();
define('IN_TG',true);
require 'include/global.php';
//require dirname(__FILE__).'/include/header.php';
require 'include/register.inc.php';
if (@$_GET['action']=='2'){
check_code($_POST['yzm'],$_SESSION['code']);
$_clean=array();
$_clean['uniqid']=check_uniqid($_POST['uniqid'], $_SESSION['uniqid']);
$_clean['active']=active_uniqid();
$_clean['username']=check_username($_POST['username'],2,40);
$_clean['password']=check_password($_POST['password'], $_POST['notpassword'],6);
$_clean['passt']=check_question($_POST['passt'], 4, 20);
$_clean['passd']=check_answer($_POST['passt'],$_POST['passd'],2,20);
$_clean['sex']=check_sex($_POST['sex']);
$_clean['email']=check_mail($_POST['email'],6,40);
$_clean['$_qq']=check_qq($_POST['qq']);
$_clean['$_url']=check_url($_POST['url'],40);
@mysql_query( "INSERT INTO project.test1(
tg_id,
tg_uniqid,
tg_active,
tg_usename,
tg_password,
tg_passt,
tg_passd,
tg_email,
tg_qq,
tg_url,
tg_sex,
tg_reg_time,
tg_last_time,
tg_last_ip
)
values(
'{$_clean['uniqid']}',
'{$_clean['active']}',
'{$_clean['username']}',
'{$_clean['password']}',
'{$_clean['passt']}',
'{$_clean['passd']}',
'{$_clean['email']}',
'{$_clean['qq']}',
'{$_clean['url']}',
'{$_clean['sex']}'
'now()',
'now()',
'{$_SERVER["REMOTE_ADDR"]}'
)")or die(mysql_error());
mysql_close();
location('æåä½ ï¼æ³¨åæå','1.php');
}else{$_SESSION['uniqid']=$_uniqid=sha1(uniqid(rand(),true));}
?>
å¤ç¨æ·çè¨ç³»ç»--注å
define('script','register');
require dirname(__FILE__).'/include/tittle.php';
?>
require dirname(__FILE__).'/include/header.php';
?>
require dirname(__FILE__).'/include/footer.php';
?>
æ°æ®åºå段å
tg_id mediumint(8) UNSIGNED å¦ æ
tg_uniqid char(40) utf8_general_ci å¦ æ
tg_active char(40) utf8_general_ci å¦ æ
tg_usename varchar(20) utf8_general_ci å¦ æ
tg_password char(40) utf8_general_ci å¦ æ
tg_passt varchar(20) utf8_general_ci å¦ æ
tg_passd char(40) utf8_general_ci å¦ æ
tg_sex varchar(1) utf8_general_ci å¦ æ
tg_email varchar(40) utf8_general_ci æ¯ NULL
tg_qq tinyint(10) æ¯ NULL
tg_url varchar(40) utf8_general_ci æ¯ NULL
tg_reg_time datetime å¦ æ
tg_last_time datetime å¦ æ
tg_last_id varchar(20) cp1251_general_ci å¦ æ
å ¨é / å ¨ä¸é éä¸é¡¹ï¼
define('IN_TG',true);
require 'include/global.php';
//require dirname(__FILE__).'/include/header.php';
require 'include/register.inc.php';
if (@$_GET['action']=='2'){
check_code($_POST['yzm'],$_SESSION['code']);
$_clean=array();
$_clean['uniqid']=check_uniqid($_POST['uniqid'], $_SESSION['uniqid']);
$_clean['active']=active_uniqid();
$_clean['username']=check_username($_POST['username'],2,40);
$_clean['password']=check_password($_POST['password'], $_POST['notpassword'],6);
$_clean['passt']=check_question($_POST['passt'], 4, 20);
$_clean['passd']=check_answer($_POST['passt'],$_POST['passd'],2,20);
$_clean['sex']=check_sex($_POST['sex']);
$_clean['email']=check_mail($_POST['email'],6,40);
$_clean['$_qq']=check_qq($_POST['qq']);
$_clean['$_url']=check_url($_POST['url'],40);
@mysql_query( "INSERT INTO project.test1(
tg_id,
tg_uniqid,
tg_active,
tg_usename,
tg_password,
tg_passt,
tg_passd,
tg_email,
tg_qq,
tg_url,
tg_sex,
tg_reg_time,
tg_last_time,
tg_last_ip
)
values(
'{$_clean['uniqid']}',
'{$_clean['active']}',
'{$_clean['username']}',
'{$_clean['password']}',
'{$_clean['passt']}',
'{$_clean['passd']}',
'{$_clean['email']}',
'{$_clean['qq']}',
'{$_clean['url']}',
'{$_clean['sex']}'
'now()',
'now()',
'{$_SERVER["REMOTE_ADDR"]}'
)")or die(mysql_error());
mysql_close();
location('æåä½ ï¼æ³¨åæå','1.php');
}else{$_SESSION['uniqid']=$_uniqid=sha1(uniqid(rand(),true));}
?>
define('script','register');
require dirname(__FILE__).'/include/tittle.php';
?>
require dirname(__FILE__).'/include/header.php';
?>
ä¼å注å
require dirname(__FILE__).'/include/footer.php';
?>
æ°æ®åºå段å
tg_id mediumint(8) UNSIGNED å¦ æ
tg_uniqid char(40) utf8_general_ci å¦ æ
tg_active char(40) utf8_general_ci å¦ æ
tg_usename varchar(20) utf8_general_ci å¦ æ
tg_password char(40) utf8_general_ci å¦ æ
tg_passt varchar(20) utf8_general_ci å¦ æ
tg_passd char(40) utf8_general_ci å¦ æ
tg_sex varchar(1) utf8_general_ci å¦ æ
tg_email varchar(40) utf8_general_ci æ¯ NULL
tg_qq tinyint(10) æ¯ NULL
tg_url varchar(40) utf8_general_ci æ¯ NULL
tg_reg_time datetime å¦ æ
tg_last_time datetime å¦ æ
tg_last_id varchar(20) cp1251_general_ci å¦ æ
å ¨é / å ¨ä¸é éä¸é¡¹ï¼
åå¤è®¨è®º(解å³æ¹æ¡)
insert æ令çå段å表æ¯14个ï¼å¼å表åªæ13个
åºè¯¥æ¯ç¼ºå° tg_id ç对åºå¼
å¦æ tg_id å¼èªå¢å段ï¼å¯å å»
å¦å¤ now() å½æ°ä¸è¦ç¨å¼å·æ¬èµ·ï¼å¦ååæå符串äº
now()å½æ°ä¸ç¨å¼å·æ¬èµ·æ¥ä¼æ¥é å°±ç®æ¯å¢å äºIDç对åºå¼ä¹æ¯Column count doesn't match value count at row 1
Column count doesn't match value count
åæ°ä¸å¹é
å¦æä½ éè¦åæé误ï¼æä¹å°±ä¸è¯´ä»ä¹äº
ä¼ä¸ä¼æ¯æ°æ®åºå段é®é¢
values éé¢çå¼ç个æ°ä¸åé¢çåæ°ä¸å¹é
é½ä¸å¯¹åºæ°æ®åºæä¹åæå ¥å¤çï¼å°±è·ä½ åæ¬åä¸ç¢é¥çï¼ç°å¨ç»ä½ 两ç¢ä½ è¯å®åä¸ä¸ï¼é£å¦¥å¦¥çæ¥éåã
推荐阅读
-
Column count doesn't match value count at row 1_MySQL
-
Column count doesn't match value count at row 1_MySQL
-
ç»è®°é¡µé¢åºç°Column count doesn't match value count at row 1
-
Column count doesn't match value
-
Column count doesn't match value_PHP教程
-
Column count doesn't match value
-
注å页é¢åºç°Column count doesn't match value count at row 1
-
注å页é¢åºç°Column count doesn't match value count at row 1
-
SQL报错:Column count doesn't match value count at row 1
-
ERROR 1136 (21S01): Column count doesn't match value count at row 1