I don't understand why I can't retrieve an INSERT with a (seemingly) exactly identical SELECT statement :
INSERT INTO parcelrates(fromzip, tozip, weight, length, height, width) VALUES (69003, 69001, 141.096, 3.93701, 3.93701, 1.5748)
SELECT * FROM parcelrates WHERE fromzip = 69003 AND tozip = 69001 AND weight = 141.096 AND length = 3.93701 AND height = 3.93701 AND width = 1.5748
This simply returns nothing.
Here is my table structure :
id INT(11) AI PK
fromzip INT(11)
tozip INT(11)
weight FLOAT
length FLOAT
height FLOAT
width FLOAT
date TIMESTAMP (on update CURRENT_TIMESTAMP())
rates LONGTEXT
My guess is that I've messed up the float values but I can't figure out how.
Edit:
Here is the create statement:
CREATE TABLE `parcelrates` (
`id` int(11) NOT NULL,
`fromzip` int(11) NOT NULL,
`tozip` int(11) NOT NULL,
`weight` float NOT NULL,
`length` float NOT NULL,
`height` float NOT NULL,
`width` float NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`rates` longtext CHARACTER SET utf8
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
Unfortunately the only log I find (MAMP) is mysql_error_log.err, which does not log anything :
tomsihap@itchy > /Applications/MAMP/logs $ tail mysql_error_log.err
160304 10:10:12 InnoDB: Completed initialization of buffer pool
160304 10:10:12 InnoDB: highest supported file format is Barracuda.
160304 10:10:13 InnoDB: Waiting for the background threads to start
160304 10:10:14 InnoDB: 5.5.42 started; log sequence number 9768747
160304 10:10:14 [Note] Server hostname (bind-address): '0.0.0.0'; port: 8889
160304 10:10:14 [Note] - '0.0.0.0' resolves to '0.0.0.0';
160304 10:10:14 [Note] Server socket created on IP: '0.0.0.0'.
160304 10:10:14 [Note] Event Scheduler: Loaded 0 events
160304 10:10:14 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.5.42' socket: '/Applications/MAMP/tmp/mysql/mysql.sock' port: 8889 Source distribution