I would like to retrieve data from a given index. Here's the sql code of the database:
CREATE TABLE `test` (
`index` int(11) NOT NULL AUTO_INCREMENT,
`user` text NOT NULL,
PRIMARY KEY (`index`),
UNIQUE KEY `index` (`index`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1
I can retrieve data from user like this:
SELECT * FROM test WHERE user='bertrand'
but when I try with index like this:
'index'=1
it gives me nothing ! I don't understand what I'm doing wrong, any help would be appreciated, thanks.