我在数据库和数据库中插入一些值插入后,当我检查数据库中的值时,它显示不同的值。为什么?请帮帮我
我的代码是..
"INSERT INTO `tblRechargeReports`
(`rechargeOnNumber` , `rechargeOnOperator`, `rechargeAmount`, `rechargeOnCircle`, `rechargedOn`)
VALUES('" . $array['rechargeOnNumber'] . "', '" . $array['rechargeOnOperator'] . "','" . $array['rechargeAmount'] . "', '" . $array['rechargeOnCircle'] . "', NOW() )";
当我在die()函数后检查时,它显示为.....
INSERT INTO `tblRechargeReports` (`rechargeOnNumber` , `rechargeOnOperator`, `rechargeAmount`, `rechargeOnCircle`, `rechargedOn`)
VALUES('9002261639', '1','100', '2', NOW() )
答案 0 :(得分:0)
请将手机号码的数据类型设为bigint
或varchar
。
答案 1 :(得分:0)
请尝试使用下表格式:
id INT(11) AUTO_INCREMENT NOT NULL,
rechargeOnNumber VARCHAR(20) NOT NULL,
rechargeOnOperator VARCHAR(100) NOT NULL,
rechargeAmount INT(5) NOT NULL,
rechargeOnCircle VARCHAR(100) NOT NULL,
rechargedOn DATETIME NOT NULL,
rechargeData TEXT(100) NULL,
rechargeStatus ENUM('Y', 'N') NOT NULL DEFAULT 'Y',
isDelete ENUM('Y', 'N') NOT NULL DEFAULT 'N',
PRIMARY KEY (id),
UNIQUE KEY IDX_rechargeOnOperator (rechargeOnOperator)