I have the following table:
CREATE TABLE IF NOT EXISTS `notes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL DEFAULT '0',
`note` text,
PRIMARY KEY (`id`)
)
INSERT INTO `notes` (`id`, `uid`, `note`) VALUES
(1, 1, 'noteteeext'),
(2, 1, 'notenotenotenote');
As you can see i have 2 rows with uid=1 but it only returns 1 row! (the second one)
$sql = "SELECT id,uid,note
FROM notes
WHERE uid = 1";
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)) {
echo $row['note'];
}
What's wrong? :/